Skip to content

Conversation

@quintinwang5
Copy link
Contributor

print works now on DLE 2025.0.0. But test_print UTs still fail. There are two reason:

  1. We use subprocess to call print while we use sycl::queue from torch. So the queue cannot be synced before the exiting of subprocess.
  2. torch.xpu.synchronize() does not work because it just sync on reserved streams. (See the comment). Accroding to my test, our print kernels were not waited on.

So I add an launch_exit_hook to wait on that queue.

@etiotto etiotto requested review from a team and alexbaden November 28, 2024 15:09
return torch.xpu.current_stream().sycl_queue

def wait(self):
self.wait_on_sycl_queue(self.get_sycl_queue())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the torch.xpu.current_stream().wait()?
It is easy for us to decouple the SYCL runtime in triton to torch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems torch does not provide such a wait now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revisit the runtime code in the future. I think it is ok for now.

Copy link
Contributor

@Dewei-Wang-sh Dewei-Wang-sh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@whitneywhtsang whitneywhtsang merged commit dbe7a5b into main Dec 2, 2024
6 checks passed
@whitneywhtsang whitneywhtsang deleted the quinint/fix_test_print branch December 2, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UT] regression in test_subprocess.py with the PTDB 0.5.3

6 participants