-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[CustomOp] Fix ext_tensor.cast failed bug #34884
[CustomOp] Fix ext_tensor.cast failed bug #34884
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.
LGTM
@@ -17,7 +17,7 @@ function(windows_symbolic TARGET) | |||
add_custom_command(OUTPUT ${final_path}/.${src}.cu | |||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${final_path}/${src}.cc" "${final_path}/.${src}.cu" | |||
COMMENT "create hidden file of ${src}.cu") | |||
add_custom_target(${TARGET} ALL DEPENDS .${src}.cu) | |||
add_custom_target(${TARGET} ALL DEPENDS ${final_path}/.${src}.cu) |
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.
LoL, so we have a file named "ext_tensor.cu" for Linux Symlink, and a hidden ".ext_tensor.cu"(actually .ext_tensor.cu.cu) for Windows Symlink. What if there were a third/fourth... platform?
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.
src
is ext_tensor
here. If system is based on Unix, these is no problem generally.
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.
we should remove these symlink cases later, include data_type_transform, tensor_utils, etc.
PR types
Bug fixes
PR changes
Others
Describe
The code in macro
__NVCC__
need to put into.cu
file and compiled bynvcc
.Before this PR, if we call
tensor.cast(x)
and x.place is kGPU, it will throw error.