Skip to content

Skip HSTU paged-KV test when SM80 kernels are unavailable - #6085

Open
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D113933857
Open

Skip HSTU paged-KV test when SM80 kernels are unavailable#6085
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D113933857

Conversation

@q10

@q10 q10 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary:
The OSS HSTU CUDA CI lane builds the HSTU wheel without arch 8.0 in
TORCH_CUDA_ARCH_LIST, so the Ampere fbgemm::hstu_varlen_fwd_80 op is
never registered (see CMakeLists.txt, which only compiles the Ampere
sources when "8.0" is in TORCH_CUDA_ARCH_LIST). On the Ampere-class
GitHub runner (A10G, capability (8, 6)),
HSTUPagedKVTest::test_paged_kv_attn dispatches to that op and fails with:

AttributeError: '_OpNamespace' 'fbgemm' object has no attribute 'hstu_varlen_fwd_80'

Gate the SM80-specific paged-KV test on a new has_sm80_hstu_support()
helper that requires both an Ampere (major version 8) device and the
hstu_varlen_fwd_80 op to actually be present in the build, so the test
skips instead of erroring when the SM80 kernels are not compiled. A pure
device-capability check is insufficient because the failing runner is
major version 8 but simply lacks the compiled op.

Reviewed By: henrylhtsang

Differential Revision: D113933857

Summary:
The OSS HSTU CUDA CI lane builds the HSTU wheel without arch 8.0 in
TORCH_CUDA_ARCH_LIST, so the Ampere `fbgemm::hstu_varlen_fwd_80` op is
never registered (see CMakeLists.txt, which only compiles the Ampere
sources when "8.0" is in TORCH_CUDA_ARCH_LIST). On the Ampere-class
GitHub runner (A10G, capability (8, 6)),
`HSTUPagedKVTest::test_paged_kv_attn` dispatches to that op and fails with:

  AttributeError: '_OpNamespace' 'fbgemm' object has no attribute 'hstu_varlen_fwd_80'

Gate the SM80-specific paged-KV test on a new `has_sm80_hstu_support()`
helper that requires both an Ampere (major version 8) device and the
`hstu_varlen_fwd_80` op to actually be present in the build, so the test
skips instead of erroring when the SM80 kernels are not compiled. A pure
device-capability check is insufficient because the failing runner is
major version 8 but simply lacks the compiled op.

Reviewed By: henrylhtsang

Differential Revision: D113933857
@meta-cla meta-cla Bot added the cla signed label Jul 28, 2026
@meta-codesync

meta-codesync Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113933857.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant