[xpu][test] Make tests in test_float8_tensor.py device agnostic
This PR makes test_float8_tensor.py device agnostic and supports XPU.
Dependencies
This PR dependends on following PR.
- PyTorch: https://github.com/pytorch/pytorch/pull/166056 : 166056 registered
torch._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:
Now _scaled_mm only supports per-tensor scaling for CPU backend.
- torchao: https://github.com/pytorch/ao/pull/3249 : 3249 adds the util function for
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().
# Skipped Lists
test_bmm: 2 tests
test_expected_gpu_kernel_fbgemm: 1 test.
test_fp8_conv_variants : 16 tests.
test_fp8_conv_skip_quant: 8 tests.
test_moe_weight_reshape_ops: 1 test.
:link: Helpful Links
:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3332
- :page_facing_up: Preview Python docs built from this PR
Note: Links to docs will display an error until the docs builds have been completed.
This comment was automatically generated by Dr. CI and updates every 15 minutes.
@pytorchbot label "xpu"
@Stonepia since the scaled_mm has been merged. pls rebase this pr again.
@pytorchbot rebase
@Stonepia pls rebase this PR.
To add the ciflow label ciflow/xpu please first approve the workflows that are awaiting approval (scroll to the bottom of this page).
This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.
@pytorchbot rebase
You don't have permissions to rebase this PR since you are a first time contributor. If you think this is a mistake, please contact PyTorch Dev Infra.