-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[webgpu] And int64 to cast #25610
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
[webgpu] And int64 to cast #25610
Conversation
|
Sorry, please hold on the review. I may miss some situations. |
This PR adds the int64 type to cast to avoid data readback to cpu for some models during the execution. It won't bring the perf regression since no matter the cast is from int64 to int32 or int32 to int64, usually the other type is webgpu supported which means that the previous op or the following op runs on gpu.
|
@guschmue @fs-eire This PR is ready for review. Please take a look, thanks. |
|
Hi, @qjia7 , is it not very reasonable that bind the usage of Cast(tensor_int64) and |
Hi Xinghua, this change is target for graph capture and doesn't affect the existing logic. I understand other cases may also need the cast_int64 support in webgpu. But I'm unsure if a session option is the best solution since many other ops may also need such kind of changes. I also offline talked with @fs-eire. He is considering an alternative way to support int64 in GetCapability. Therefore, we need to consider more factors. I prefer to proceed with this PR to unblock progress. Even if the final solution involves adding a session option, it won't affect the main changes of this PR—only the dynamic registration conditions would need to be modified. |
This pull request extends the WebGPU execution provider to support int64 data type casting in the `Cast` operator, with conditional support based on whether graph capture is enabled. It refactors kernel registration to allow toggling int64 support and updates the shader code and kernel logic to handle int64 tensors efficiently. It's part of the work to enable graph capture in phi4 #25868
This pull request extends the WebGPU execution provider to support int64 data type casting in the `Cast` operator, with conditional support based on whether graph capture is enabled. It refactors kernel registration to allow toggling int64 support and updates the shader code and kernel logic to handle int64 tensors efficiently. It's part of the work to enable graph capture in phi4 microsoft#25868
This pull request extends the WebGPU execution provider to support int64 data type casting in the
Castoperator, with conditional support based on whether graph capture is enabled. It refactors kernel registration to allow toggling int64 support and updates the shader code and kernel logic to handle int64 tensors efficiently.It's part of the work to enable graph capture in phi4 #25868