-
Notifications
You must be signed in to change notification settings - Fork 22
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
[oneMKL] Interface variants of trsm! and trmm! #479
base: master
Are you sure you want to change the base?
Conversation
@kballeda It seems that the new variants of T = Float32
alpha = rand(T)
beta = rand(T)
@testset "trmm!" begin
A = triu(rand(T, m, m))
B = rand(T, m, n)
dA = oneArray(A)
dB = oneArray(B)
# Test without beta
C = alpha * A * B
oneMKL.trmm!('L', 'U', 'N', 'N', alpha, dA, dB)
# Move to host and compare
h_C = Array(dB)
@test C ≈ h_C
# Test with beta
C = rand(T, m, n)
dC = oneArray(C)
oneMKL.trmm!('L', 'U', 'N', 'N', alpha, beta, dA, dB, dC) # <-- fail
h_C = Array(dC)
D = alpha * A * B + beta * C
@test D ≈ h_C
end
@testset "left trsm!" begin
A = triu(rand(T, m, m))
B = rand(T, m, n)
dA = oneArray(A)
dB = oneArray(B)
# Test without beta
C = alpha * (A \ B)
dC = copy(dB)
oneMKL.trsm!('L', 'U', 'N', 'N', alpha, dA, dC)
@test C ≈ Array(dC)
# Test with beta
C = rand(T, m, n)
dC = oneArray(C)
oneMKL.trsm!('L', 'U', 'N', 'N', alpha, beta, dA, dB, dC) # <-- fail
h_C = Array(dC)
D = alpha * (A \ B) + beta * C
@test D ≈ h_C
end
@testset "right trsm!" begin
A = rand(T, m, m)
B = triu(rand(T, m, m))
dA = oneArray(A)
dB = oneArray(B)
# Test without beta
C = alpha * (A / B)
dC = copy(dA)
oneMKL.trsm!('R', 'U', 'N', 'N', alpha, dB, dC)
@test C ≈ Array(dC)
# Test with beta
C = rand(T, m, m)
dC = oneArray(C)
oneMKL.trsm!('R', 'U', 'N', 'N', alpha, beta, dA, dB, dC) # <-- fail
h_C = Array(dC)
D = alpha * (A / B) + beta * C
@test D ≈ h_C
end |
Thanks for reporting! Let me check this at my end with C reproducer. |
No, the build over at JuliaPackaging/Yggdrasil#9552 fails probably because of bugs in the Intel libraries. I was going to wait for a new version of the base toolkit before investigating. I see 2025.0.0 has been released now, so we should probably try again. |
I will check how to update the wrappers for oneMKL. [1/4] Building CXX object CMakeFiles/oneapi_support.dir/src/sycl.cpp.o
FAILED: CMakeFiles/oneapi_support.dir/src/sycl.cpp.o
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/bin/icpx -Doneapi_support_EXPORTS -fsycl -isystem /home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/include -isystem /home/alexis/.julia/artifacts/4acaedf5204fc60d0f11bb5d32020fa91c5b3d10/include -std=gnu++17 -fPIC -MD -MT CMakeFiles/oneapi_support.dir/src/sycl.cpp.o -MF CMakeFiles/oneapi_support.dir/src/sycl.cpp.o.d -o CMakeFiles/oneapi_support.dir/src/sycl.cpp.o -c /home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:9:72: error: unknown type name 'pi_native_handle'; did you mean 'ur_native_handle_t'?
9 | auto sycl_platform = sycl::ext::oneapi::level_zero::make_platform((pi_native_handle) driver);
| ^~~~~~~~~~~~~~~~
| ur_native_handle_t
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/bin/compiler/../../include/sycl/ur_api.h:400:19: note: 'ur_native_handle_t' declared here
400 | typedef uintptr_t ur_native_handle_t;
| ^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:9:57: error: no member named 'make_platform' in namespace 'sycl::ext::oneapi::level_zero'
9 | auto sycl_platform = sycl::ext::oneapi::level_zero::make_platform((pi_native_handle) driver);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:22:68: error: unknown type name 'pi_native_handle'; did you mean 'ur_native_handle_t'?
22 | sycl::ext::oneapi::level_zero::make_device(platform->val, (pi_native_handle) device);
| ^~~~~~~~~~~~~~~~
| ur_native_handle_t
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/bin/compiler/../../include/sycl/ur_api.h:400:19: note: 'ur_native_handle_t' declared here
400 | typedef uintptr_t ur_native_handle_t;
| ^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:22:9: error: no member named 'make_device' in namespace 'sycl::ext::oneapi::level_zero'; did you mean 'sycl::ext::oneapi::level_zero::detail::make_device'?
22 | sycl::ext::oneapi::level_zero::make_device(platform->val, (pi_native_handle) device);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| sycl::ext::oneapi::level_zero::detail::make_device
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/include/sycl/ext/oneapi/backend/level_zero.hpp:44:22: note: 'sycl::ext::oneapi::level_zero::detail::make_device' declared here
44 | __SYCL_EXPORT device make_device(const platform &Platform,
| ^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:40:68: error: unknown type name 'pi_native_handle'; did you mean 'ur_native_handle_t'?
40 | sycl::ext::oneapi::level_zero::make_context(sycl_devices, (pi_native_handle) context, keep_ownership);
| ^~~~~~~~~~~~~~~~
| ur_native_handle_t
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/bin/compiler/../../include/sycl/ur_api.h:400:19: note: 'ur_native_handle_t' declared here
400 | typedef uintptr_t ur_native_handle_t;
| ^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:40:40: error: no member named 'make_context' in namespace 'sycl::ext::oneapi::level_zero'
40 | sycl::ext::oneapi::level_zero::make_context(sycl_devices, (pi_native_handle) context, keep_ownership);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:54:93: error: unknown type name 'pi_native_handle'; did you mean 'ur_native_handle_t'?
54 | auto sycl_queue = sycl::ext::oneapi::level_zero::make_queue(context->val, device->val, (pi_native_handle) queue, false, keep_ownership, {});
| ^~~~~~~~~~~~~~~~
| ur_native_handle_t
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/bin/compiler/../../include/sycl/ur_api.h:400:19: note: 'ur_native_handle_t' declared here
400 | typedef uintptr_t ur_native_handle_t;
| ^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:54:54: error: no member named 'make_queue' in namespace 'sycl::ext::oneapi::level_zero'
54 | auto sycl_queue = sycl::ext::oneapi::level_zero::make_queue(context->val, device->val, (pi_native_handle) queue, false, keep_ownership, {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:66:79: error: unknown type name 'pi_native_handle'; did you mean 'ur_native_handle_t'?
66 | auto sycl_event = sycl::ext::oneapi::level_zero::make_event(context->val, (pi_native_handle) event, keep_ownership);
| ^~~~~~~~~~~~~~~~
| ur_native_handle_t
/home/alexis/.julia/scratchspaces/8f75cd03-7ff8-4ecb-9b8f-daf728133b1b/conda/bin/compiler/../../include/sycl/ur_api.h:400:19: note: 'ur_native_handle_t' declared here
400 | typedef uintptr_t ur_native_handle_t;
| ^
/home/alexis/Bureau/git/oneAPI.jl/deps/src/sycl.cpp:66:53: error: no member named 'make_event' in namespace 'sycl::ext::oneapi::level_zero'
66 | auto sycl_event = sycl::ext::oneapi::level_zero::make_event(context->val, (pi_native_handle) event, keep_ownership);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
10 errors generated.
[2/4] Building CXX object CMakeFiles/oneapi_support.dir/src/onemkl.cpp.o
ninja: build stopped: subcommand failed.
ERROR: LoadError: failed process: Process(`/home/alexis/.julia/artifacts/7e62c00e1f15f21da3a56196bac84e23e6d629c3/bin/ninja -C /tmp/jl_NRO6kE install`, ProcessExited(1)) [1] |
dce5866
to
08e7dfa
Compare
Doesn't seem fixed on v2025.0.0 |
Interface variants of
trsm!
andtrmm!
with additional arguments.