Skip to content

Conversation

@kballeda
Copy link

This PR consists of Level-1 (scal) primitive support for oneJulia

Copy link
Owner

@pengtu pengtu left a 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.

@kballeda
Copy link
Author

kballeda commented Nov 1, 2022

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.
If I check the oneMKL.scal primitive for CPU/GPU tests are passing. I have added the changes please take look when you get a chance.

Copy link
Owner

@pengtu pengtu left a 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!

end
end

LinearAlgebra.rmul!(x::oneStridedVecOrMat{<:onemklFloat}, k::Number) =
Copy link
Owner

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, Thanks

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