-
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
support Kunlun2 #34459
support Kunlun2 #34459
Conversation
Thanks for your contribution! |
XPUDeviceContext::XPUDeviceContext() { | ||
context_ = xpu::create_context(); | ||
xpu_version_ = get_xpu_version(place_.device); | ||
} | ||
|
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.
前面的文件是不是需要获取 L3的大小的接口,在下面可以传入L3的大小,根据卡的大小来设置?
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.
runtime有提供了这个接口xpu_get_device_attr,根据需要后面可以添加。
{"batch_norm", XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})}, | ||
{"batch_norm_grad", | ||
XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})}, | ||
{"cast", XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})}, |
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.
这个data_type是怎么确定的,kl1的cast只支持fp32吗
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.
这个type data_type是REGISTER_OP_KERNEL时指定的type,应该是输入的类型。
KL1目前支持FP32, int32, int64,这边漏加了,下个PR我不上去。
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.
嗯,应该还有挺多op的type需要补的,比如one_hot
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.
ok,这个我下个PR再核验一下
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
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
PR types
Others
PR changes
Others
Describe
Support Kunlun2.