gemini-code-assist[bot] commented on code in PR #19600:
URL: https://github.com/apache/tvm/pull/19600#discussion_r3296284434


##########
tests/python/tirx/operator/tile_primitive/cuda/test_copy_async_tmem.py:
##########
@@ -26,6 +26,8 @@
 from tvm.tirx.layout import S, TCol, TileLayout, TLane
 from tvm.tirx.layout import tid_in_wg as axis_tid_in_wg
 
+pytestmark = tvm.testing.requires_cuda.marks()

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   This file contains tests for `tcgen05`-based TMEM copies, which require the 
Blackwell architecture (SM 100). Please update the `pytestmark` to include the 
appropriate compute version requirement.
   
   ```suggestion
   pytestmark = [*tvm.testing.requires_cuda.marks(), 
tvm.testing.requires_cuda_compute_version(10)]
   ```



##########
tests/python/tirx/operator/tile_primitive/cuda/test_copy_dsmem.py:
##########
@@ -38,6 +38,8 @@
 from tvm.tirx.operator.tile_primitive.ops import CopyAsync
 from tvm.tirx.stmt_functor import StmtExprVisitor
 
+pytestmark = tvm.testing.requires_cuda.marks()

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   This file tests DSMEM copies between CTAs in a cluster, a feature requiring 
Hopper (SM 90) or newer. Please add the compute version guard to the 
module-level `pytestmark`.
   
   ```suggestion
   pytestmark = [*tvm.testing.requires_cuda.marks(), 
tvm.testing.requires_cuda_compute_version(9)]
   ```



##########
tests/python/tirx/codegen/test_codegen_cuda.py:
##########
@@ -569,6 +577,7 @@ def main(A: Tx.Buffer((N), "float16")):
 
 @pytest.mark.parametrize("trans", [False, True])
 @pytest.mark.parametrize("num", [1, 2, 4])
[email protected]_cuda_compute_version(7, 5)

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   The `requires_cuda_compute_version` decorator in TVM typically expects a 
single version number (int or float) as its first argument. Passing `(7, 5)` as 
two separate arguments will likely cause `5` to be interpreted as the `exact` 
parameter, meaning the test would only run on exactly SM 7.0 instead of SM 7.5 
or newer. It should be `7.5` to correctly target Turing architecture.
   
   ```suggestion
   @tvm.testing.requires_cuda_compute_version(7.5)
   ```



##########
tests/python/tirx/codegen/test_codegen_dsmem.py:
##########
@@ -21,6 +21,8 @@
 import tvm.testing
 from tvm.script import tirx as Tx
 
+pytestmark = tvm.testing.requires_cuda.marks()

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   The tests in this file use `cp.async.bulk` instructions for cluster-level 
copies, which were introduced in the Hopper architecture (SM 90). The module 
should be guarded with a minimum compute version of 9.
   
   ```suggestion
   pytestmark = [*tvm.testing.requires_cuda.marks(), 
tvm.testing.requires_cuda_compute_version(9)]
   ```



##########
tests/python/tirx/operator/tile_primitive/cuda/test_smem_tmem_dispatch.py:
##########
@@ -33,6 +33,8 @@
 from tvm.tirx.layout import R, S, TCol, TileLayout, TLane
 from tvm.tirx.operator.tile_primitive.cuda.tma_utils import SwizzleMode, 
mma_shared_layout
 
+pytestmark = tvm.testing.requires_cuda.marks()

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   The `smem->tmem` dispatch tested here relies on Blackwell-specific `tcgen05` 
instructions. While some functions are guarded individually, it is safer and 
cleaner to guard the entire module with an SM 100 requirement, especially since 
tests like `test_multi_cp_sw0_4tiles` are currently missing guards.
   
   ```suggestion
   pytestmark = [*tvm.testing.requires_cuda.marks(), 
tvm.testing.requires_cuda_compute_version(10)]
   ```



##########
tests/python/tirx/operator/tile_primitive/cuda/test_gemm_async.py:
##########
@@ -40,6 +40,8 @@
     mma_shared_layout,
 )
 
+pytestmark = tvm.testing.requires_cuda.marks()

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   All tests in this file utilize `tcgen05` instructions, which are exclusive 
to the Blackwell architecture (SM 100). To prevent these tests from attempting 
to run (and failing) on older GPUs, the module-level `pytestmark` should 
include a compute version guard for SM 100.
   
   ```suggestion
   pytestmark = [*tvm.testing.requires_cuda.marks(), 
tvm.testing.requires_cuda_compute_version(10)]
   ```



##########
tests/python/tirx/operator/tile_primitive/cuda/test_copy_async_tma.py:
##########
@@ -38,6 +38,8 @@
 from tvm.tirx.stmt import DeclBuffer, TilePrimitiveCall
 from tvm.tirx.stmt_functor import StmtExprVisitor
 
+pytestmark = tvm.testing.requires_cuda.marks()

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   TMA (Tensor Memory Accelerator) is a feature introduced in Hopper (SM 90). 
Since this file is dedicated to TMA tests, it is recommended to guard the 
entire module with an SM 90 requirement.
   
   ```suggestion
   pytestmark = [*tvm.testing.requires_cuda.marks(), 
tvm.testing.requires_cuda_compute_version(9)]
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to