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

Support for MPS backend #43

Open
Tianyuan-Zhang opened this issue Oct 17, 2024 · 2 comments
Open

Support for MPS backend #43

Tianyuan-Zhang opened this issue Oct 17, 2024 · 2 comments

Comments

@Tianyuan-Zhang
Copy link

The current version doesn't support for the MPS backend which is available in PyTorch.
Is is possible to add support for MPS backend?
I tried to manually move the tensors and predictive models to MPS device, but got errors when calculating the loss functions.

@LucasBoTang
Copy link
Collaborator

Hi Tianyuan,

PyEPO hasn't been tested on the MPS backend. Generally, the device should not affect the calculation of loss functions, but it would help if you could provide the specific error messages you're encountering so I can examine the issue more closely.

If you're comfortable sharing your code, I can also try to test it. However, I don't currently have access to a macOS system currently.

@Tianyuan-Zhang
Copy link
Author

mps_bug.zip
I've attached two Jupyter notebooks that show the error.
The first one, I didn't move the tensors to the MPS device, which caused an error when calculating the regret.
The second one, I moved the tensors to the MPS device, but still got an error when calculating the regret.

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

No branches or pull requests

2 participants