Tags: Rajioba1/ao
Tags
Address review: use torch.accelerator.current_accelerator() Per review feedback, replace the torchao.utils.get_current_accelerator_device() helper with the upstream torch.accelerator.current_accelerator() API, which is the direction tracked in pytorch#2917 / pytorch#4384. Note the suggested spelling in the review comment, torch.accelerator.get_current_accelerator(), does not exist; the actual API is torch.accelerator.current_accelerator(). This also avoids the helper's assert torch.accelerator.is_available(), which would raise on CPU-only runners; current_accelerator() returns None there and the comparison simply evaluates to False.
Address review: use torch.accelerator.current_accelerator() Per review feedback, replace the torchao.utils.get_current_accelerator_device() helper with the upstream torch.accelerator.current_accelerator() API, which is the direction tracked in pytorch#2917 / pytorch#4384. Note the suggested spelling in the review comment, torch.accelerator.get_current_accelerator(), does not exist; the actual API is torch.accelerator.current_accelerator().
Address review: use torch.accelerator.current_accelerator() Per review feedback, replace the torchao.utils.get_current_accelerator_device() helper with the upstream torch.accelerator.current_accelerator() API, which is the direction tracked in pytorch#2917 / pytorch#4384. Note the suggested spelling in the review comment, torch.accelerator.get_current_accelerator(), does not exist; the actual API is torch.accelerator.current_accelerator(). Scoped to the call site added by this PR; the pre-existing ones in this file are left to the file-wide migration.
Address review: use torch.accelerator.current_accelerator() Per review feedback, replace the torchao.utils.get_current_accelerator_device() helper with the upstream torch.accelerator.current_accelerator() API, which is the direction tracked in pytorch#2917 / pytorch#4384. Note the suggested spelling in the review comment, torch.accelerator.get_current_accelerator(), does not exist; the actual API is torch.accelerator.current_accelerator(). This also drops the torchao.utils import that the previous commit added, since it would otherwise be unused (ruff F401).
Address review: use torch.accelerator.current_accelerator() Per review feedback, replace the torchao.utils.get_current_accelerator_device() helper with the upstream torch.accelerator.current_accelerator() API, which is the direction tracked in pytorch#2917 / pytorch#4384. Note the suggested spelling in the review comment, torch.accelerator.get_current_accelerator(), does not exist; the actual API is torch.accelerator.current_accelerator(). The torchao.utils import of the helper is dropped along with it, since it would otherwise be unused (ruff F401).
Address review: spell out both backend requirements in skip reason Review noted "For CUDA, SM89+ is required. For ROCm, MI300/MI350 is required." The predicate already encodes exactly that: is_sm_at_least_89() short-circuits on torch.version.cuda and is_MI300()/is_MI350() short-circuit on torch.version.hip, so only one arm can be true for a given build. Only the message was ambiguous, so make both backend requirements explicit.
Address review: use parenthesised multi-line import format Match the import style used by the surrounding imports in this file, as requested in review. The magic trailing comma keeps ruff format from collapsing it back onto one line.
Drop unintended file mode change on ci_test_xpu.sh The previous commit inadvertently flipped ci_test_xpu.sh from 100644 to 100755, which shows up as unrelated "mode change" noise in the PR diff. Restore the original mode; the only intended change is the added test path.
PreviousNext