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

67 torch.compile tests #81

Merged
merged 4 commits into from
Dec 11, 2024
Merged

67 torch.compile tests #81

merged 4 commits into from
Dec 11, 2024

Conversation

qiancao
Copy link
Collaborator

@qiancao qiancao commented Dec 10, 2024

Added two tests for torch.compile(cox) and torch.compile(weibull).

Note: the tests were run on CPU-only nodes, GPUs not tested yet.

@qiancao qiancao added the enhancement ✨ New feature or request label Dec 11, 2024
@qiancao qiancao self-assigned this Dec 11, 2024
@tcoroller
Copy link
Collaborator

@qiancao ping me when its good for review!

@tcoroller tcoroller marked this pull request as draft December 11, 2024 14:35
@tcoroller
Copy link
Collaborator

@qiancao is it worth adding the compiler in the notebooks too? Or this would create issue for windows user?

@tcoroller tcoroller added this to the 0.1.4 milestone Dec 11, 2024
@qiancao
Copy link
Collaborator Author

qiancao commented Dec 11, 2024

@qiancao is it worth adding the compiler in the notebooks too? Or this would create issue for windows user?

@tcoroller We should not alter the existing notebooks to add torch.compile. But in the future, we can consider adding a notebook specifically on how to accelerate the code using torch.compile/TorchScript. I think torch.compile will still be a problem for most windows users at this point:

https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Accelerate-PyTorch-Inference-with-torch-compile-on-Windows-CPU/post/1640044
https://pytorch.org/tutorials/prototype/inductor_windows_cpu.html

loss_weibull = weibull(log_hz, event, time)
loss_cweibull = cweibull(log_hz, event, time)

self.assertTrue(
Copy link
Collaborator

Choose a reason for hiding this comment

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

@qiancao using Torch.allclose() to prevent converting to numpy. All good else!

@tcoroller tcoroller marked this pull request as ready for review December 11, 2024 21:17
@tcoroller tcoroller merged commit 6ed7d8c into main Dec 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants