-
Notifications
You must be signed in to change notification settings - Fork 8
Add riscv64 and Imagination Technologies GPUs support #232
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
Conversation
85f336b
to
6621830
Compare
m_vendor_name.find("img") != std::string::npos || | ||
m_vendor_id == 0x1010) { | ||
m_vendor_code = VENDOR_CODE_IMG; | ||
m_default_wgs = 32; |
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.
Why you decided to set default wgs = 32, and not 64? It seems that 64 suits in most cases well
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.
RECOMMENDATION: If possible use a workgroup size of 32.
This is a recommendation from the official Imagination Technologies blog
@@ -138,7 +143,12 @@ namespace spla { | |||
auto* cl_coo = s.template get<CLCooVec<T>>(); | |||
auto* cpu_coo = s.template get<CpuCooVec<T>>(); | |||
cpu_coo_vec_resize(cl_coo->values, *cpu_coo); | |||
cl_coo_vec_read(cl_coo->values, cpu_coo->Ai.data(), cpu_coo->Ax.data(), *cl_coo, cl_acc->get_queue_default()); | |||
if (!cl_acc->is_img()) { |
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 guess, comments with explanation and references to related documents are necessary here.
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.
Done
@@ -146,7 +146,12 @@ namespace spla { | |||
auto* cl_csr = s.template get<CLCsr<T>>(); | |||
auto* cpu_csr = s.template get<CpuCsr<T>>(); | |||
cpu_csr_resize(s.get_n_rows(), cl_csr->values, *cpu_csr); | |||
cl_csr_read(s.get_n_rows(), cl_csr->values, cpu_csr->Ap.data(), cpu_csr->Aj.data(), cpu_csr->Ax.data(), *cl_csr, cl_acc->get_queue_default()); | |||
if (!cl_acc->is_img()) { |
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 guess, comments with explanation and references to related documents are necessary here.
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.
Done
@@ -126,7 +126,12 @@ namespace spla { | |||
auto* cl_acc = get_acc_cl(); | |||
auto* cl_dense = s.template get<CLDenseVec<T>>(); | |||
auto* cpu_dense = s.template get<CpuDenseVec<T>>(); | |||
cl_dense_vec_read(s.get_n_rows(), cpu_dense->Ax.data(), *cl_dense, cl_acc->get_queue_default()); | |||
if (!cl_acc->is_img()) { |
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 guess, comments with explanation and references to related documents are necessary here.
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.
Done
Closes #231
Problem
In src/opencl/cl_format_*.hpp, copying data to staging buffer created with
CL_MEM_READ_ONLY
flag does not affect this buffer.Workaround
Remove this flag if device vendor is Imagination Technologies.
Testing
Solution was tested on
All tests were passed