Support torch validation and add to spmd tests#3003
Support torch validation and add to spmd tests#3003ethanglaser wants to merge 2 commits intouxlfoundation:mainfrom
Conversation
|
/intelci: run |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| xp = array_api_modules[target_df] | ||
| return xp.asarray(obj) | ||
| elif target_df == "torch": | ||
| if hasattr(torch, "xpu") and torch.xpu.is_available(): |
There was a problem hiding this comment.
should probably be documented to prevent confusion
|
I assume the dpc runtime mismatch issue between torch and dpnp is solved? otherwise this may make things difficult. good addition |
|
/intelci: run |
|
The CI error: |
If installing both torch and dpnp without oneapi deps, there are no issues |
| return xp.asarray(obj) | ||
| elif target_df == "torch": | ||
| if hasattr(torch, "xpu") and torch.xpu.is_available(): | ||
| return torch.as_tensor(obj, device="xpu", *args, **kwargs) |
There was a problem hiding this comment.
It seems we are testing np.float32/np.float64 dtypes in convert_to_dataframe and torch does not take this, maybe we need to conver to torch dtype before passing to as_tensor
the release schedules are not matching which caused previous issues in one of the oneAPI minor releases. may break things for a bit at 2026.0 release w. r. t. torch |
Description
Checklist:
Completeness and readability
Testing
Performance