-
Notifications
You must be signed in to change notification settings - Fork 661
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
[primitive] add binary tests #8109
Conversation
guo-ran
commented
Apr 27, 2022
•
edited
Loading
edited
- binary
- elemwise: test_type 0
- broadcast: test_type 1
- left_scalar: test_type 2
- right_scalar: test_type 3
…Inc/oneflow into dev_add_primitive_tests
#define CPU_PRIMITIVE_BINARY_ONEDNN_TYPE_SEQ \ | ||
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::s8, DataType::kInt8, int8_t) \ | ||
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::u8, DataType::kBool, bool) \ | ||
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::u8, DataType::kUInt8, uint8_t) \ |
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.
onednn实现的int8和uint8类型过不了primitive单测 @luqiang-guo
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.
计算策略不同,onednn在溢出的时候是截断处理,torch 直接溢出
…o/oneflow-repo into dev_add_primitive_tests
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::s8, DataType::kInt8, int8_t) \ | ||
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::u8, DataType::kBool, bool) \ | ||
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::u8, DataType::kUInt8, uint8_t) \ | ||
OF_PP_MAKE_TUPLE_SEQ(dnnl::memory::data_type::f32, DataType::kFloat, float) \ |
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.
float类型过不了left_scalar和right_scalar的单测,是不是实现时没考虑位置不同计算的区别 @luqiang-guo
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.
已修复
ready for review |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8109/ |
…o/oneflow-repo into dev_add_primitive_tests
…Inc/oneflow into dev_add_primitive_tests
…dev_add_primitive_tests
@luqiang-guo 麻烦看下guoran在PR中提到的onednn相关数据类型过不了Primitive测试的问题 |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8109/ |
Speed stats:
|
CI failed when running job: cuda-module. PR label automerge has been removed |
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8109/ |