Skip to content
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

[HVX] Fix EliminateInterleaves #7279

Merged
merged 5 commits into from
Jan 20, 2023
Merged

[HVX] Fix EliminateInterleaves #7279

merged 5 commits into from
Jan 20, 2023

Conversation

rootjalex
Copy link
Member

Minor fix for an edge case that introduces more shuffling.

Fixes #7100

@rootjalex rootjalex added performance hexagon Related to the hexagon (HVX) target labels Jan 16, 2023
@rootjalex rootjalex requested a review from pranavb-ca January 16, 2023 20:27
@rootjalex rootjalex changed the title Fix EliminateInterleaves [HVX] Fix EliminateInterleaves Jan 16, 2023
@steven-johnson
Copy link
Contributor

Huh, the win32 failure is one I've never seen before:

FAILED: bin/li2018_demo_gradient_autoscheduler.exe 
li2018_demo_gradient.runtime.lib(li2018_demo_gradient.runtime.obj) : error LNK2019: unresolved external symbol ___floatundisf referenced in function _halide_profiler_report_unlocked

@rootjalex
Copy link
Member Author

Huh, the win32 failure is one I've never seen before:

FAILED: bin/li2018_demo_gradient_autoscheduler.exe 
li2018_demo_gradient.runtime.lib(li2018_demo_gradient.runtime.obj) : error LNK2019: unresolved external symbol ___floatundisf referenced in function _halide_profiler_report_unlocked

That is super weird, and entirely unrelated to this PR... Strange.

@steven-johnson
Copy link
Contributor

Huh, the win32 failure is one I've never seen before:

FAILED: bin/li2018_demo_gradient_autoscheduler.exe 
li2018_demo_gradient.runtime.lib(li2018_demo_gradient.runtime.obj) : error LNK2019: unresolved external symbol ___floatundisf referenced in function _halide_profiler_report_unlocked

That is super weird, and entirely unrelated to this PR... Strange.

Maybe related to something new/different in LLVM codegen?

@steven-johnson
Copy link
Contributor

Runtime Function: float __floatundisf (unsigned long i)
Runtime Function: double __floatundidf (unsigned long i)
Runtime Function: long double __floatunditf (unsigned long i)
Runtime Function: long double __floatundixf (unsigned long i)
These functions convert i, an unsigned long, to floating point.

@rootjalex
Copy link
Member Author

That test is this file: https://github.com/halide/Halide/blob/main/test/autoschedulers/li2018/demo_generator.cpp , right? I don't even see an int -> float conversion in that code.

@rootjalex
Copy link
Member Author

Oh it's in the profiler. Hmm

@steven-johnson
Copy link
Contributor

steven-johnson commented Jan 19, 2023

So I experimentally crosscompiled _halide_profiler_report_unlocked to x86-32-windows-profile -- I don't see any calls to floatundisf there, but looking at the .ll file, there are a number of uitofp instructions, which could be the culprit. That said... that would be used all over the place, so why is the failure being reported only there?

EDIT: aha, objdump -t shows ___floatundisf in the syms. Now let me see if I can bisect where it first appeared.

@steven-johnson
Copy link
Contributor

Anyway, this is clearly unrelated, feel free to land.

@steven-johnson
Copy link
Contributor

Still finishing the bisect but the culprit is almost certainly https://reviews.llvm.org/D141074

@rootjalex rootjalex merged commit 314b2fd into main Jan 20, 2023
@rootjalex rootjalex deleted the rootjalex/hvx-interleaves branch January 20, 2023 00:35
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
* fix EliminateInterleaves

Co-authored-by: Steven Johnson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hexagon Related to the hexagon (HVX) target performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HVX] EliminateInterleaves is broken
3 participants