PortPilot
Sample report · pre-generated, always available← scan your own repo
Migration Readiness Report

state-spaces/mamba

https://github.com/state-spaces/mamba
Manual blockers present

state-spaces/mamba scored 88/100 for ROCm readiness (Manual blockers present). Of 268 CUDA-related findings, 203 work as-is on ROCm PyTorch, 63 need a mechanical HIPify-style change, and 2 are manual blockers. Focus first on the manual blockers — they gate the migration.

203Works as-is
63Mechanical change
2Manual blocker
Findings
268
Python files
68
Files scanned
107
Custom CUDA kernels
detected

Detected but out of scope (not analyzed): C++, C/C++ header

Findings by file

268 findings · 57 files
mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py· 3
C
cuda-python low-level driver API
import cuda.bindings.driver as cuda
:12

cuda-python (from cuda import cudart/cuda) wraps the CUDA driver directly. There is no drop-in ROCm binding; the driver calls must be rewritten against HIP.

RecommendRewrite driver-API calls against the HIP runtime.

Suggested change · advisory
# mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py:12
- import cuda.bindings.driver as cuda
+ import cuda.bindings.driver as cuda # advisory: see ROCm note above
A
Device string "cuda"
device = torch.device("cuda:0")
:823

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

B
Triton dependency
from triton.testing import do_bench_cudagraph
:930

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

Suggested change · advisory
# mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py:930
- from triton.testing import do_bench_cudagraph
+ from triton.testing import do_bench_cudagraph # advisory: see ROCm note above
setup.py· 1
C
Inline PTX assembly
"--ptxas-options=-v",
:240

Inline PTX is NVIDIA ISA and cannot run on AMD. The block must be hand-rewritten in HIP/GCN or replaced with a portable path.

RecommendRewrite the PTX block in HIP or a portable high-level equivalent.

Suggested change · advisory
# setup.py:240
- "--ptxas-options=-v",
+ "--ptxas-options=-v", # advisory: see ROCm note above
csrc/selective_scan/reverse_scan.cuh· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/reverse_scan.cuh:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_bf16_complex.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_bf16_complex.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_bf16_real.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_bf16_real.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_fp16_complex.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_fp16_complex.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_fp16_real.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_fp16_real.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_fp32_complex.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_fp32_complex.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_fp32_real.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_fp32_real.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_bwd_kernel.cuh· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_bwd_kernel.cuh:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_fwd_bf16.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_fwd_bf16.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_fwd_fp16.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_fwd_fp16.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_fwd_fp32.cu· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_fwd_fp32.cu:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/selective_scan_fwd_kernel.cuh· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/selective_scan_fwd_kernel.cuh:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
csrc/selective_scan/uninitialized_copy.cuh· 1
B
Custom CUDA kernels (.cu/.cuh)
CUDA kernel source
file

Hand-written .cu/.cuh kernels compile only with nvcc. AMD's HIPify tools translate the vast majority of CUDA C++ to HIP automatically.

RecommendRun hipify-perl over the .cu/.cuh sources and build with hipcc.

Suggested change · advisory
# csrc/selective_scan/uninitialized_copy.cuh:?
- CUDA kernel source
+ CUDA kernel source # advisory: see ROCm note above
mamba_ssm/modules/mha.py· 2
B
FlashAttention dependency
from flash_attn import flash_attn_with_kvcache
:11

FlashAttention has an official ROCm/CK implementation. Swapping the wheel (or using PyTorch SDPA) is mechanical.

RecommendInstall the ROCm FlashAttention build or fall back to torch SDPA.

Suggested change · advisory
# mamba_ssm/modules/mha.py:11
- from flash_attn import flash_attn_with_kvcache
+ from flash_attn import flash_attn_with_kvcache # advisory: see ROCm note above
B
FlashAttention dependency
from flash_attn.layers.rotary import RotaryEmbedding
:16

FlashAttention has an official ROCm/CK implementation. Swapping the wheel (or using PyTorch SDPA) is mechanical.

RecommendInstall the ROCm FlashAttention build or fall back to torch SDPA.

Suggested change · advisory
# mamba_ssm/modules/mha.py:16
- from flash_attn.layers.rotary import RotaryEmbedding
+ from flash_attn.layers.rotary import RotaryEmbedding # advisory: see ROCm note above
mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py· 1
B
Triton dependency
from triton.testing import do_bench
:37

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

Suggested change · advisory
# mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py:37
- from triton.testing import do_bench
+ from triton.testing import do_bench # advisory: see ROCm note above
mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py· 1
B
Triton dependency
from triton.testing import do_bench
:13

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

Suggested change · advisory
# mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py:13
- from triton.testing import do_bench
+ from triton.testing import do_bench # advisory: see ROCm note above
mamba_ssm/ops/triton/k_activations.py· 4
B
Triton dependency
import triton
:5

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:6

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:60

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:146

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/layer_norm.py· 7
B
Triton dependency
import triton
:16

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:17

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
gcn_arch_name = torch.cuda.get_device_properties(0).gcnArchName
:135

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
device_name = torch.cuda.get_device_properties(0).name
:144

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:370

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
sm_count = torch.cuda.get_device_properties(x.device).multi_processor_count
:660

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:671

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/layernorm_gated.py· 5
B
Triton dependency
import triton
:12

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:13

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:139

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
sm_count = torch.cuda.get_device_properties(x.device).multi_processor_count
:309

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:317

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/mamba3/angle_dt.py· 2
B
Triton dependency
import triton
:6

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:7

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

mamba_ssm/ops/triton/mamba3/grouped_head_reduction.py· 2
B
Triton dependency
import triton
:6

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:7

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

mamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py· 5
B
Triton dependency
import triton
:10

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:11

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.testing
:12

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(q.device.index):
:203

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device = "cuda"
:330

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py· 40
B
Triton dependency
import triton
:49

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:50

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
dSSdA = torch.randn(B, H, nchunks, C, C, device='cuda', dtype=torch.float32)
:1426

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
ddA_cs = torch.randn(B, H, S, device='cuda', dtype=torch.float32)
:1427

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
ddA_cs_rev = torch.randn(B, H, S, device='cuda', dtype=torch.float32)
:1428

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1 # Scale to avoid overflow
:1429

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs_rev = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1430

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
trap = torch.rand(B, H, S, device='cuda', dtype=torch.float16)
:1474

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dt = F.softplus(-3.0 + torch.randn(B, H, S, device='cuda', dtype=torch.float))
:1475

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dfactor = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1476

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dgamma_diag = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1477

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
da = -F.softplus(-3.0 + torch.randn(B, H, S, device='cuda', dtype=torch.float))
:1518

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device='cuda',
:1521

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
da = -F.softplus(-3.0 + torch.randn(B, H, S, device='cuda', dtype=torch.float))
:1560

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device='cuda', dtype=torch.int32,
:1601

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dSSdA = torch.randn(B, H, nchunks_global, C, C, device='cuda', dtype=torch.float32)
:1610

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
ddA_cs = torch.randn(B, H, S, device='cuda', dtype=torch.float32)
:1611

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
ddA_cs_rev = torch.randn(B, H, S, device='cuda', dtype=torch.float32)
:1612

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1613

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs_rev = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1614

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
SSdA = torch.zeros(B, H, nchunks_global, C, C, device='cuda', dtype=torch.float32)
:1618

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs_padded = torch.zeros(B, H, curr_padded_len, device='cuda', dtype=torch.float32)
:1627

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device='cuda', dtype=torch.int32,
:1667

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
trap = torch.rand(B, H, S, device='cuda', dtype=torch.float16)
:1671

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dt = F.softplus(-3.0 + torch.randn(B, H, S, device='cuda', dtype=torch.float32))
:1672

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dfactor = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1673

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dgamma_diag = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1674

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

B
Triton dependency
from triton.testing import do_bench
:1706

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
dSSdA = torch.randn(B, H, nchunks, C, C, device='cuda', dtype=torch.float32)
:1723

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
ddA_cs = torch.randn(B, H, S, device='cuda', dtype=torch.float32)
:1724

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
ddA_cs_rev = torch.randn(B, H, S, device='cuda', dtype=torch.float32)
:1725

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1726

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dA_cs_rev = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1727

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

B
Triton dependency
from triton.testing import do_bench
:1769

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
da = F.softplus(-3.0 + torch.randn(B, H, S, device='cuda', dtype=torch.float))
:1783

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

B
Triton dependency
from triton.testing import do_bench
:1806

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
trap = torch.ones(B, H, S, device='cuda', dtype=torch.float16) * 0.5
:1820

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dt = F.softplus(-3.0 + torch.randn(B, H, S, device='cuda', dtype=torch.float))
:1821

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dfactor = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1822

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dgamma_diag = torch.randn(B, H, S, device='cuda', dtype=torch.float32) * 0.1
:1823

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py· 3
B
Triton dependency
import triton
:14

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:15

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
return torch.empty(size, device="cuda", dtype=torch.int8)
:1785

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py· 2
B
Triton dependency
import triton
:13

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
return torch.empty(size, device="cuda", dtype=torch.int8)
:23

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/triton/mamba3/mamba3_siso_fwd.py· 3
B
Triton dependency
import triton
:14

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:15

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
return torch.empty(size, device="cuda", dtype=torch.int8)
:437

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/triton/mamba3/mamba3_siso_step.py· 3
B
Triton dependency
import triton
:12

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:13

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
Device string "cuda"
return torch.empty(size, device="cuda", dtype=torch.int8)
:230

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/triton/mamba3/utils.py· 2
B
Triton dependency
import triton
:7

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:8

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

mamba_ssm/ops/triton/selective_state_update.py· 3
B
Triton dependency
import triton
:10

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:11

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:200

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/softplus.py· 2
B
Triton dependency
import triton
:1

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:2

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

mamba_ssm/ops/triton/ssd_bmm.py· 4
B
Triton dependency
import triton
:10

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:11

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(a.device.index):
:198

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(a.device.index):
:253

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/ssd_chunk_scan.py· 13
B
Triton dependency
import triton
:12

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:13

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1390

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(C.device.index):
:1436

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
sm_count = torch.cuda.get_device_properties(dout.device).multi_processor_count
:1485

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(dout.device.index):
:1491

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
sm_count = torch.cuda.get_device_properties(x.device).multi_processor_count
:1534

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1540

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1592

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1640

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1680

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1713

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(dout.device.index):
:1747

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/ssd_chunk_state.py· 10
B
Triton dependency
import triton
:10

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:11

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(dt.device.index):
:727

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(dt.device.index):
:787

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:829

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:878

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
sm_count = torch.cuda.get_device_properties(x.device).multi_processor_count
:937

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:943

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:996

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:1032

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/ssd_combined.py· 3
B
Triton dependency
import triton
:16

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:17

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(x.device.index):
:308

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/ops/triton/ssd_state_passing.py· 4
B
Triton dependency
import triton
:10

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

B
Triton dependency
import triton.language as tl
:11

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
with torch.cuda.device(states.device.index):
:210

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.device(dout.device.index):
:258

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/utils/determinism.py· 1
B
Triton dependency
import triton
:10

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

pyproject.toml· 1
B
Triton dependency
"triton>=3.5.0",
:23

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

tests/benchmark_determinism_kernels.py· 10
B
Triton dependency
from triton.testing import do_bench
:8

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
torch.cuda.empty_cache()
:20

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.reset_peak_memory_stats()
:21

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.synchronize()
:22

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.synchronize()
:28

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.synchronize()
:31

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
return torch.cuda.max_memory_allocated() / (1024 * 1024)
:32

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device = "cuda"
:37

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
if not torch.cuda.is_available():
:103

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
print(f"GPU: {torch.cuda.get_device_name(0)}")
:118

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

tests/ops/cute/test_mamba3_mimo_step.py· 8
A
Device string "cuda"
DEVICE = "cuda"
:39

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
if not torch.cuda.is_available():
:56

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.manual_seed_all(42)
:161

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.manual_seed_all(42)
:167

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.manual_seed_all(42)
:176

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.manual_seed_all(42)
:182

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

B
Triton dependency
from triton.testing import do_bench_cudagraph
:265

OpenAI Triton has an AMD backend. Kernels usually run on ROCm with a matching Triton build; occasional tuning is needed.

RecommendInstall the ROCm-enabled Triton build.

A
torch.cuda API usage
torch.cuda.manual_seed_all(42)
:272

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

benchmarks/benchmark_generation_mamba_simple.py· 5
A
Device string "cuda"
device = "cuda"
:31

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
input_ids = torch.randint(1, 1000, (args.batch, args.promptlen), dtype=torch.long, device="cuda")
:47

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
attn_mask = torch.ones_like(input_ids, dtype=torch.long, device="cuda")
:48

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.synchronize()
:86

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.synchronize()
:90

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

evals/lm_harness_eval.py· 1
A
Device string "cuda"
def __init__(self, pretrained="state-spaces/mamba-2.8b", max_length=2048, batch_size=None, device="cuda",
:19

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/modules/ssd_minimal.py· 1
A
Device string "cuda"
device = "cuda"
:92

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py· 6
A
Device string "cuda"
o = torch.empty((B, S, H, P), device='cuda', dtype=dtype)
:693

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
o = torch.empty((B, S, R, H, P), device='cuda', dtype=dtype)
:695

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
h = torch.empty((NS, H, N, P), device='cuda', dtype=torch.float32) if return_state else None
:723

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k_final = torch.empty((NS, R, H, N), device='cuda', dtype=dtype) if return_state else None
:724

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
h = torch.empty((B, H, N, P), device='cuda', dtype=torch.float32) if return_state else None
:726

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k_final = torch.empty((B, R, H, N), device='cuda', dtype=dtype) if return_state else None
:727

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py· 4
A
Device string "cuda"
o = torch.empty((B, S, H, P), device='cuda', dtype=dtype)
:515

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
o = torch.empty((B, S, R, H, P), device='cuda', dtype=dtype)
:517

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
h = torch.empty((B, H, N, P), device='cuda', dtype=torch.float32) if return_state else None
:544

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k_final = torch.empty((B, R, H, N), device='cuda', dtype=dtype) if return_state else None
:545

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

mamba_ssm/utils/generation.py· 10
A
torch.cuda API usage
start = torch.cuda.Event(enable_timing=enable_timing)
:214

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
end = torch.cuda.Event(enable_timing=enable_timing)
:215

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.synchronize()
:241

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
cache.mempool = torch.cuda.graphs.graph_pool_handle()
:320

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
s = torch.cuda.Stream()
:353

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
s.wait_stream(torch.cuda.current_stream())
:354

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.stream(s):
:355

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.current_stream().wait_stream(s)
:369

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
graph = torch.cuda.CUDAGraph()
:372

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
with torch.cuda.graph(graph, pool=mempool):
:373

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

mamba_ssm/utils/torch.py· 1
A
Device string "cuda"
kwargs["device_type"] = "cuda"
:8

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/modules/test_mamba3_varlen.py· 4
A
torch.cuda API usage
if not torch.cuda.is_available():
:17

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device="cuda",
:36

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:68

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:103

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/ops/test_selective_scan.py· 2
A
Device string "cuda"
device = 'cuda'
:42

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = 'cuda'
:161

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/ops/tilelang/test_mamba3_mimo.py· 47
A
torch.cuda API usage
if not torch.cuda.is_available():
:72

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
torch.cuda.manual_seed_all(seed)
:150

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
q = torch.randn((b, s, r, g, n), device="cuda", dtype=dtype)
:152

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k = torch.randn((b, s, r, g, n), device="cuda", dtype=dtype)
:153

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
v = torch.randn((b, s, h, p), device="cuda", dtype=dtype)
:154

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
q_bias = torch.randn((h, r, n), device="cuda", dtype=torch.float32)
:156

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k_bias = torch.randn((h, r, n), device="cuda", dtype=torch.float32)
:157

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
mimo_v = torch.randn((h, r, p), device="cuda", dtype=torch.float32) / r
:158

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
mimo_o = torch.randn((h, r, p), device="cuda", dtype=torch.float32) / r
:159

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
d = torch.randn((h,), device="cuda", dtype=torch.float32) if has_d else None
:163

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(b, s, h, n // rotary_dim_divisor), device="cuda", dtype=torch.float32
:166

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dt = F.softplus(-3.0 + torch.randn((b, h, s), device="cuda", dtype=torch.float32))
:168

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
a = torch.rand((b, h, s), device="cuda", dtype=torch.float32)
:169

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
trap = torch.rand((b, h, s), device="cuda", dtype=dtype)
:172

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
outproj_norm_weight = torch.randn((h, p), device="cuda", dtype=torch.float32)
:174

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device: str = "cuda",
:211

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
if device == "cuda":
:216

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.manual_seed_all(seed)
:217

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
dout_prereduce = torch.randn((b, s, r, h, p_dim), device="cuda", dtype=FIXED_DTYPE)
:1363

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device="cuda",
:1607

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device="cuda", dtype=torch.int32,
:1660

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.manual_seed_all(42)
:1664

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
(1, s_total, mimo_rank, nheads_qk, headdim_qk), device="cuda",
:1667

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(1, s_total, nheads, headdim_v), device="cuda",
:1672

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
-3.0 + torch.randn(1, nheads, s_total, device="cuda", dtype=torch.float)
:1676

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
torch.rand((1, nheads, s_total), device="cuda", dtype=FIXED_DTYPE) * 0.5
:1680

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(nheads, mimo_rank, headdim_qk), device="cuda",
:1683

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
torch.randn((nheads, mimo_rank, headdim_v), device="cuda", dtype=torch.float32) / mimo_rank
:1688

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(1, s_total, nheads, headdim_qk // rotary_dim_divisor), device="cuda",
:1693

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
D = torch.randn((nheads,), device="cuda", dtype=torch.float32, requires_grad=True)
:1696

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(1, s_total, nheads, headdim_v), device="cuda",
:1698

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.manual_seed_all(seed)
:1789

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device="cuda",
:1797

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
q = torch.randn((b, s_total, r, g, n), device="cuda", dtype=dtype)
:1801

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k = torch.randn((b, s_total, r, g, n), device="cuda", dtype=dtype)
:1802

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
v = torch.randn((b, s_total, h, p), device="cuda", dtype=dtype)
:1803

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
q_bias = torch.randn((h, r, n), device="cuda", dtype=torch.float32)
:1805

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
k_bias = torch.randn((h, r, n), device="cuda", dtype=torch.float32)
:1806

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
mimo_v = torch.randn((h, r, p), device="cuda", dtype=torch.float32) / r
:1807

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
mimo_o = torch.randn((h, r, p), device="cuda", dtype=torch.float32) / r
:1808

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
d = torch.randn((h,), device="cuda", dtype=torch.float32) if has_d else None
:1812

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(b, s_total, h, n // rotary_dim_divisor), device="cuda", dtype=torch.float32
:1815

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
dt = F.softplus(-3.0 + torch.randn((b, h, s_total), device="cuda", dtype=torch.float32))
:1817

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
a = torch.rand((b, h, s_total), device="cuda", dtype=torch.float32)
:1818

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
trap = torch.rand((b, h, s_total), device="cuda", dtype=dtype)
:1825

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
outproj_norm_weight = torch.randn((h, p), device="cuda", dtype=torch.float32)
:1827

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
(b, s_total, r, h_dim, p_dim), device="cuda", dtype=FIXED_DTYPE
:2349

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/ops/triton/test_layernorm_gated.py· 1
A
Device string "cuda"
device = 'cuda'
:34

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/ops/triton/test_mamba3_siso.py· 4
A
Device string "cuda"
device = 'cuda'
:489

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = 'cuda'
:564

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = 'cuda'
:678

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = 'cuda'
:845

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/ops/triton/test_selective_state_update.py· 4
A
Device string "cuda"
device = "cuda"
:23

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:67

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:113

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:162

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/ops/triton/test_ssd.py· 1
A
Device string "cuda"
device = 'cuda'
:31

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

tests/test_determinism.py· 16
A
torch.cuda API usage
torch.cuda.manual_seed_all(seed)
:17

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device = "cuda"
:37

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.synchronize()
:139

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:182

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:190

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:198

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:206

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:214

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device = "cuda"
:218

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.synchronize()
:238

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:264

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device = "cuda"
:268

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.synchronize()
:290

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
torch.cuda API usage
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA required")
:307

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

A
Device string "cuda"
device = "cuda"
:311

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
torch.cuda API usage
torch.cuda.synchronize()
:329

Calls under torch.cuda.* are aliased by ROCm builds of PyTorch. The same code runs on AMD Instinct GPUs unchanged — torch.cuda.is_available(), streams, events and AMP all map onto HIP.

RecommendNo change required. Install the ROCm build of PyTorch (pip install torch --index-url https://download.pytorch.org/whl/rocm6.1).

tests/test_generation.py· 3
A
Device string "cuda"
device = "cuda"
:16

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:50

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.

A
Device string "cuda"
device = "cuda"
:123

The literal device string "cuda" resolves to the active AMD GPU on ROCm PyTorch. .to("cuda") / device="cuda" need no edits.

RecommendNo change required on ROCm PyTorch.