-
Notifications
You must be signed in to change notification settings - Fork 1.3k
update roundeven backend algorithm #758
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
|
HI @joddiy , this is updated according to the round even requirement, could you please help to review? |
|
error message at math_kernel.cu line 143: it needs explicit type instead of auto? Maybe I try later version of GCC first |
Resolved after upgrading C and CXX complier versions in #759 |
src/core/tensor/math_kernel.cu
Outdated
| for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; | ||
| i += blockDim.x * gridDim.x) { | ||
| out[i] = roundf(in[i]/2)*2; | ||
| auto doub = in[i]*2; |
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.
This auto causes problem in CXX complier version 5.4, upgraded to 7.5.0 will then be okay. Resolved in #759
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.
Thank you Chris for the prompt response! I could also replace the auto in this PR. Yes I think updating to newer gcc is a good idea, although the "new"(c++11) one is already widely used and not that new, it would be helpful to support running c++11 code.
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 there is no need to change the auto, auto seems to be a good way to prevent implicit type casting (sometime developer us could be careless). The only problem of auto is just the code readability for the developer to know the exact datatype.
In any case, I think need to keep the same version of complier between the docker version and conda version (as in #759), because a few day ago we had the similar complier error because of the version different.
|
@dcslin The test case looks good to me |
No description provided.