1

I'd like to use Halide for ARM A53(aarch64) target with neon vectorization.

But I cannot figure out how to create Target object. Also I cannot find aarch64 target with neon feature in Target.h.

The below code I've tested runs on A53 target but the generated code does not contain neon instructions.

Target target("arm-64-linux"); // is it right?
Buffer<uint16_t> input(640,480);

Var x,y;
Func brighter("brighter");
brighter(x,y) = input(x,y) + 100;
brighter.estimate(x, 0, 640).
         estimate(y, 0, 480);

Pipeline p(brighter);
p.auto_schedule(target);
p.compile_to_static_library("./lib_dummy", {input}, "", target);

1 Answer 1

5

arm-64 is what Halide uses for aarch64, so your target is fine. To use neon instructions, you need to be vectorizing something. Not sure if the autoscheduler is doing that or not (it should be!). Try not autoscheduling and instead just saying:

brighter.vectorize(x, 8);
2
  • still cannot see the neon instructions even if using brighter.vectorize instread of auto_schedule().
    – junhee
    Feb 16, 2017 at 5:14
  • My mistake! I was searching arm 32 instructions instead of ARMv8 instructions. The binary contains ARMv8 instructions.
    – junhee
    Feb 20, 2017 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.