-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Phi] Migrate logical_and/or/not/xor into Phi #39942
Conversation
Thanks for your contribution! |
|
||
} // namespace phi | ||
|
||
#define REGISTER_LOGICAL_CUDA_KERNEL(logical_and, func_type) \ |
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.
这里的宏定义参数命名 logical_and 需要改为 kernel_name?
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.
这里是因为我们CMake里有一个kernel的匹配逻辑,会去匹配第一个有效kernel_name,所以这里是故意这么写的
|
||
} // namespace phi | ||
|
||
#define REGISTER_LOGICAL_CPU_KERNEL(logical_and, func_type) \ |
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.
这里的宏定义参数命名 logical_and 需要改为 kernel_name?
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.
如上
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
@@ -55,7 +55,7 @@ def setUp(self): | |||
|
|||
def test_dygraph(self): | |||
for place in self.places: | |||
paddle.disable_static(place) | |||
paddle.disable_static() |
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.
这里修改的原因是?
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.
paddle.disable_static(place) 根据不同的place多次调用时,在除了第一次以外的调用,并不会根据place来切换tracer执行的place。这里 place的取值为cpu, gpu,导致第二次for循环本来应该用gpu的,但却使用了CPU。
PR types
Others
PR changes
Others
Describe
[Phi] Migrate logical_and/or/not/xor into Phi