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
Linalg benchmark #3247
Linalg benchmark #3247
Conversation
I can only do: g++ and For |
Hi @OXPHOS The point of the benchmark is to compare the performance between direct library function call and shogun linalg method call, NOT between CPU and GPU backend. The two benchmarks should be something like
Run this experiment with vectors of size 1000, 10000, 100000 and so on. We want to check whether using our version of dot has any overhead, and if yes, how much. See the point? There might be an issue with your OpenCL installation. Should not be too hard to fix it. |
{ | ||
index_t n = num_rows; | ||
std::vector<int32_t> mem(n); | ||
std::iota(mem.data(), mem.data() + n, begin); |
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 create std::vector
first?
(not sure where to put this) |
Hi @OXPHOS! Great job with the benchmarks :) This is exactly what we were looking for. Interesting issues will be visible from these benchmarks. Let me comment on the code first and then we'll discuss |
Ac = init_c(A); | ||
Bc = init_c(B); | ||
Ag = init_g(A); | ||
Bg = init_g(B); |
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.
indentation :)
Hey there! Please check the comments. We need to make sure that no extra copying is happening under the hood. The Good job by the way! Also, please check the coding style for shogun. It is better to follow a uniform style everywhere. Let me know when you fix the issues. Would be interesting to see how it performs in other machines. |
|
||
SGVector<value_type> A; | ||
SGVector<value_type> B; | ||
CPUVector<value_type> Ac; |
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.
Just have a BaseVector<value_type>* Ac
here. Same for others. Should be allocated in the heap.
benchmark code, travis check not needed. merging. |
sg_linalg
(segmentation fault 11)