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
Dev scalar op #5778
Dev scalar op #5778
Conversation
.SetIsMatchedHob( \ | ||
(user_op::HobDeviceTag() == device) \ | ||
& (user_op::HobDataType("in", 0) == GetDataType<input_dtype>::value)); | ||
|
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.
下面这些宏,还可以再合并一下,参考
#define MATH_BINARY_BROADCAST_LOGICAL_FUNC_SEQ \ |
#define REGISTER_MATH_BINARY_BROADCAST_LOGICAL_KERNEL(math_type_pair, device, data_type_pair) \ |
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.
后向算子也要支持一下
logical算子我们和pytorch都没有后向 |
CI failed, removing label automerge |
CI failed, removing label automerge |
Speed stats:
|
Speed stats:
|
test_case.assertEqual(m.training, True) | ||
m.eval() | ||
test_case.assertEqual(m.training, False) | ||
# def test_nested_module(test_case): |
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 scalar系列op
并去除原始实现中不必要的Tensor构造