Skip to content

Fix and test HelloiOS app #6536

Description

@Infinoid

Based on gitter discussion, the HelloiOS app seems to have developed some bit-rot.

Here are the issues I see:

  • No README.md
  • Compilation of target objects couldn't find HalideRuntime.h, HalideRuntimeMetal.h, HalideBuffer.h
  • App is not CI-tested. We won't have the target libraries to link the actual iOS application executable, but we can build and run the generator at least
  • No build scripts apart from the xcode project file (a shell script, Makefile or CMakeLists.txt would be helpful for testing)
  • .gpu_tile() now requires caller to specify inner Vars/RVars
  • Unhelpful error messages like Can't split RVar r37$x into Var v2 due to unnamed Vars & RVars

I think that at a minimum, this fix is needed:

@@ -129,17 +129,18 @@ public:
                     .unroll(c)
                     .gpu_tile(y, yi, 8);
             }
+            RVar rxi{"rxi"}, ryi{"ryi"};
             new_state.update(4)
                 .reorder(c, clobber.x)
                 .unroll(c)
-                .gpu_tile(clobber.x, clobber.y, 1, 1);
+                .gpu_tile(clobber.x, clobber.y, rxi, ryi, 1, 1);
 
             state.dim(0).set_stride(3);
             state.dim(2).set_stride(1).set_extent(3);

I don't have xcode or an iOS device, so I can't test any further than building/generating the Halide pipelines. But after applying the above fix, apparently this failure occurs at runtime:

Assertion failed: (i >= 0 && i < this->dimensions()), function dim, file HalideBuffer.h, line 496.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions