[XPU] [Test] Make tests in test_float8_tensor.py device agnostic #3332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes
test_float8_tensor.pydevice agnostic and supports XPU.Dependencies
This PR dependends on following PR.
scaled_mmandscaled_mm_v2for xpu pytorch#166056 : 166056 registeredtorch._scaled_mmfor XPU device. Without it, thescaled_mmwill fallback to CPU device, and cause theRowWisetests failed (CPU only supports tensorwise scaling for now).If 166056 not merged, 57 tests will fail with the error message:
auto_detect_device. We will need a rebase after 3249 is merged.Test Status
After the dependencies in the above are merged, the tests will be 428 passed and 28 skipped. All the skipped tests are due to the fbgemm check
_is_fbgemm_gpu_genai_available().