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

New recipe: High Performance Tensor Transposition library (v1.0.5) #4765

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

Jutho
Copy link
Contributor

@Jutho Jutho commented Apr 15, 2022

This adds the HPTT library (High Performance Tensor Transposition), original version here:
https://github.com/springer13/hptt

I plan to use this library in forthcoming versions of TensorOperations.jl, and it can also be useful to other tensor libraries.

The patch fixes compatibility with clang, and corresponds to the changes of PR springer13/hptt#16 .

While the library promises dedicated optimisations for the ARM platform, these lead to compiler issues ( believe the original source file does contain bugs or is broken), so I decided to fall back to the general build flags on this platform and to disable specific optimisations.

On Intel platforms, I enable avx optimisations, which yields a warning that I cannot assume these to be present. The library does not support switching avx on or off at runtime, so the only way around would be to have separate builds based on the availability of AVX, which I do not know how to realise using BinaryBuilder. I assume most users would actually have AVX available.

High Performance Tensor Transposition Library (v1.0.5)
@giordano
Copy link
Member

Wow, the recipe is pretty well-done for a first-time contributor!

so the only way around would be to have separate builds based on the availability of AVX, which I do not know how to realise using BinaryBuilder.

We actually do have the means to target multiple microarchitectures, but we need to still fix a few minor bugs in the auditor (for example JuliaPackaging/BinaryBuilder.jl#1194 and JuliaPackaging/BinaryBuilderBase.jl#233) in addition to fixing what build Pkg should fall back on when the current system doesn't match the available microarchitectures. Also, it was suggested to revise the sets and names of microarchitectures we should target: JuliaPackaging/BinaryBuilderBase.jl#233 (review)

@giordano giordano merged commit 6f25ed2 into JuliaPackaging:master Apr 15, 2022
@Jutho
Copy link
Contributor Author

Jutho commented Apr 15, 2022

Thanks, this went smooth. It took inspiration from a related package (TBLIS), but it still took me about a day to get everything correct and tested (mostly because of the rather primitive build process of this particular library).

One issue I noticed is that, in run_wizard(), the github repository was cloned into ${WORKSPACE}/srcdir/hptt.git, but then when actually running build_tarballs this was ${WORKSPACE}/srcdir/hptt.git so I had to modify the script.

@giordano
Copy link
Member

Ugh. Would you mind filing an issue in https://github.com/JuliaPackaging/BinaryBuilder.jl?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants