Skip to content
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

IPEX changes the return type of the API sycl_queue and sycl_device. Triton XPU backend need to align these changes. #305

Closed
chengjunlu opened this issue Jan 19, 2024 · 3 comments
Assignees

Comments

@chengjunlu
Copy link
Contributor

The IPEX changes the sycl_queue return type at commit.
https://github.com/intel-innersource/frameworks.ai.pytorch.ipex-gpu/commit/6182b5eba7b46230fe2631677dc8aba13703389e

Changes the sycl_device return type at commit.
https://github.com/intel-innersource/frameworks.ai.pytorch.ipex-gpu/commit/f65c45e75fa52209dc174a6b56e87e107c702371

Both returns the capsule of the sycl::queue and sycl::device pointer refer to the corresponding object inside IPEX internally.

The capsule names are torch.xpu.Stream.sycl_queue and torch.xpu.device.sycl_device.

The Triton XPU backend runtime need to align the new API in IPEX to support torch DL complier use cases.

@quintinwang5
Copy link
Contributor

@chengjunlu we already use PyCapsule_GetPointer(cap, PyCapsule_GetName(cap)), not hardcode name.

if (!(queue = PyCapsule_GetPointer(cap, PyCapsule_GetName(cap))))

@chengjunlu
Copy link
Contributor Author

The merged PR.
#239

@quintinwang5
Copy link
Contributor

Fixed by #239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants