-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HEXAGON] Permit hvx_128 instruction in Blur Target #8197
base: main
Are you sure you want to change the base?
Conversation
That change to the schedule actually disables use of hvx. I think the issue is in adb_run_on_device.sh, which seems to intentionally drop HL_TARGET in favor of a locally defined APP_TARGET. It should probably use HL_TARGET, because, as you've noticed, right now it's not behaving as expected. |
Thanks for the review and the comments! I cannot run the example from the main branch with the The output from running
Please note that I do have to change the
|
Sounds like your device might not have the test signatures necessary to run user code on hexagon. Your change made it work by not running code on hexagon. The Makefile change is definitely wrong. The way these makefiles work is that 'make bin/some_target/test' should build for the target 'some_target', without reference to HL_TARGET. Only top-level makefile rules like 'make test' use HL_TARGET. They're built this way because otherwise if you try to build for multiple targets (e.g. with and without profiling) without cleaning the build tree you can get into situations where make can't find dependencies, or picks up the wrong dependencies. Makefile rules shouldn't reference external state if that state may change without doing a 'make clean'. Looks like this Makefile requires you to have set a value of CXX-my_halide_target and CXXFLAGS-my_halide_target and LDFLAGS-my_halide_target for each Halide target you want to use, and that apps/support/Makefile.inc is missing definitions of {CXX,LDFLAGS,CXXFLAGS}-arm-64-android-hvx_128 |
Thanks for your detailed answer. I have opened up a dedicated ticket to debug the hexagon issues #8201 |
Thanks for the review. I have updated the PR. Would that be a reasonable approach? |
I noticed that the variable
HL_TARGET
is not used in the generator when building the blur app for a Hexagon device. Instead, the target is always the genericarm-64-android
. The output from calling the generator is:The app then runs with the following timings:
In contrast, if explicitly use the environment variable
HL_TARGET
in the Makefile, the output from the build is:The timings for the app on an Snapdragon 865 are:
To permit building the app with the hvx instructions I had to change the following lines in the generator:
Because of the lower latency and higher degree of control, I wonder whether these changes seem beneficial or if the results are idiosyncratic to my setup. I understand the
hexagon()
call should be used then work is shared between the CPU and the DSP.