-
Notifications
You must be signed in to change notification settings - Fork 0
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
MKL: Level-1 (scal) primitive support #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a 'testf' function defined in test/setup.jl, which uses the TestSuite.compare function in
https://github.com/JuliaGPU/GPUArrays.jl/blob/master/test/testsuite.jl#L38. It copies the input data to CPU and GPU arrays and compare the results. Please modify the test using the 'testf' function for more concise code.
Thanks for your inputs. I have implemented rmul! and testf based tests they fail for one case commonly. |
1. Input array is converted to non-gpu array 2. alpha is rand instead of based on T typewq
non-gpuarray flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review my comments. Thanks!
@@ -49,6 +49,13 @@ function gemm_dispatch!(C::oneStridedVecOrMat, A, B, alpha::Number=true, beta::N | |||
end | |||
end | |||
|
|||
LinearAlgebra.rmul!(x::oneStridedVecOrMat{<:onemklFloat}, k::Number) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if these two rules will properly dispatch the combination of alpha types of ComplexF32, ComplexF64, F32 and F64 to the ComplexF32 and Complex64 scal functions.
Please write specific tests for all the combinations to make sure they are dispatched properly.
If not, we will want to use AMDGPU.jl's type based dispatching rules at
https://github.com/JuliaGPU/AMDGPU.jl/blob/master/src/blas/wrappers.jl#L85, and
https://github.com/JuliaGPU/AMDGPU.jl/blob/master/src/blas/wrappers.jl#L106
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, Thanks
This PR consists of Level-1 (scal) primitive support for oneJulia