Repository navigation
Conversation
oneAPI can't precompile these itself: this extension isn't loaded while oneAPI precompiles, so the kernels it would cache use the default tunings rather than the ones set here. When oneAPI can use the GPU while precompiling, run `sum` of a vector and along each dimension of a matrix, `cumsum`, `any` and `all` in a `@compile_workload` of the extension, at sizes that use the same kernels as arrays of millions of elements. On an Arc A770 with Julia 1.13, the first `sum` of a million elements takes 0.17 s rather than 1.2 s, and the first `cumsum` 0.41 s rather than 2.2 s, for an extension image that is 11 MB larger and about 80 ms more load time.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
oneAPI can't precompile AcceleratedKernels' operations for this extension: the extension isn't loaded while oneAPI precompiles, so kernels cached there would use the default tunings rather than the ones set here (
predicate_tuningeven selects different kernels forany/all).When oneAPI can use the GPU while precompiling, which it reports with
oneAPI.can_precompile(JuliaGPU/oneAPI.jl#753), this runssumof a vector and along each dimension of a matrix,cumsum,any,alland an Intsumin a@compile_workloadof the extension, at sizes that select the same kernels as a vector of 10^6 elements and a 1000×1000 matrix (checked by recording the kernels compiled at both sizes). With oneAPI versions withoutcan_precompilethe workload is skipped. Like oneAPI's own workload it needs Julia 1.12.On an Arc A770 with Julia 1.13, together with that oneAPI PR, the first
sumof 10^6 elements takes 0.17 instead of 1.2 s,sumalong both dimensions 0.25 instead of 2.0 s,cumsum0.41 instead of 2.2 s andall0.25 instead of 1.7 s. The extension's image grows by 11 MB, its precompilation from 1.4 to 6.9 s, andusing oneAPItakes about 80 ms longer. Most of what remains is oneAPI compiling the kernels' SPIR-V in every session, as it doesn't persist compiled kernels.