Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
01cc890
Initial API change
ksivaman Oct 9, 2025
5d584a2
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 9, 2025
c1d30ef
Change all imports and api
ksivaman Oct 10, 2025
6cbbc80
format
ksivaman Oct 10, 2025
08eadf0
fixes
ksivaman Oct 10, 2025
52ea9f4
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 10, 2025
cc38278
fix typo
ksivaman Oct 10, 2025
30b6af8
fix recipe tets
ksivaman Oct 10, 2025
151e1c8
fix more tests
ksivaman Oct 10, 2025
5b9b6f0
fix docs, tests, and make Jax change as well
ksivaman Oct 10, 2025
8ab201b
Change internal uses of fp8_autocast
ksivaman Oct 10, 2025
b20a7e4
Address nits
ksivaman Oct 12, 2025
ebdfcee
rename file
ksivaman Oct 12, 2025
3821c3c
CG function, and small test fixes
ksivaman Oct 13, 2025
a23e353
Change instances of make_graphed_callables internally
ksivaman Oct 13, 2025
7fa3ff6
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 13, 2025
6847f6e
Fix distributed tests
ksivaman Oct 13, 2025
7597671
Review
ksivaman Oct 13, 2025
db5023f
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 13, 2025
a6da9ab
Review
ksivaman Oct 13, 2025
ff03d10
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 13, 2025
ad08fa7
Fix test and add more docs
ksivaman Oct 13, 2025
aedc773
Cleanup test imports and minimize internal file imports
ksivaman Oct 13, 2025
355e0aa
Make is_bf16_available public
ksivaman Oct 13, 2025
6e2a4e5
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 13, 2025
47a4179
fixes
ksivaman Oct 13, 2025
06249b1
fix tests
ksivaman Oct 13, 2025
c43d89c
Better docs and better api
ksivaman Oct 14, 2025
d6b9c51
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 14, 2025
793feae
Merge branch 'main' into nvfp4_cleanup
ksivaman Oct 14, 2025
d859274
format
ksivaman Oct 14, 2025
d32fdc0
Apply suggestions from code review
timmoon10 Oct 14, 2025
5fc015b
fix nvfp4 test
ksivaman Oct 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/pytorch/attention/test_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
)

# Check if hardware supports FP8
fp8_available, reason_for_no_fp8 = is_fp8_available()
fp8_available, reason_for_no_fp8 = is_fp8_available(return_reason=True)

# Reset RNG seed and states
seed = 1234
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/debug/run_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
all_boolean = [True, False]
TEST_NR = 0

fp8_available, _ = is_fp8_available()
fp8_available = is_fp8_available()


def _get_tensors(parallel_mode, weight_seed=SEED, data_seed=SEED, tp_size=None, tp_rank=None):
Expand Down
8 changes: 5 additions & 3 deletions tests/pytorch/debug/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
from transformer_engine.debug.pytorch.debug_state import TEDebugState


fp8_available, reason_for_no_fp8 = is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = is_mxfp8_available()
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = is_fp8_block_scaling_available()
fp8_available, reason_for_no_fp8 = is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = is_mxfp8_available(return_reason=True)
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = is_fp8_block_scaling_available(
return_reason=True
)

LOG_QUANTIZED_CONFIG_BASE = """
log:
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/debug/test_numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
_2X_ACC_WGRAD,
)

fp8_available, reason_for_no_fp8 = is_fp8_available()
fp8_available, reason_for_no_fp8 = is_fp8_available(return_reason=True)

all_boolean = [True, False]
FP8_FORMAT = Format.HYBRID
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/debug/test_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from test_numerics import create_config_file

fp8_available, reason_for_no_fp8 = te.is_fp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)

B, S, H, D = 64, 64, 64, 64

Expand Down
6 changes: 4 additions & 2 deletions tests/pytorch/distributed/test_cast_master_weights_to_fp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
if torch.cuda.device_count() < 2:
pytest.skip("cast_master_weights_to_fp8 test needs at least 2 GPUs.")

fp8_available, reason_for_no_fp8 = is_fp8_available()
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = is_fp8_block_scaling_available()
fp8_available, reason_for_no_fp8 = is_fp8_available(return_reason=True)
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = is_fp8_block_scaling_available(
return_reason=True
)

TEST_ROOT = Path(__file__).parent.resolve()
NUM_PROCS: int = min(2, torch.cuda.device_count())
Expand Down
4 changes: 2 additions & 2 deletions tests/pytorch/distributed/test_comm_gemm_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
if torch.cuda.device_count() < 2:
pytest.skip("Comm+GEMM overlap requires at least 2 GPUs.")

fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)

RNG_SEED: int = 42
SEQ_LENGTH: int = 1024
Expand Down
6 changes: 3 additions & 3 deletions tests/pytorch/distributed/test_fusible_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@


# Check what quantization schemes are supported
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
nvfp4_available, reason_for_no_nvfp4 = te.is_mxfp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
nvfp4_available, reason_for_no_nvfp4 = te.is_mxfp8_available(return_reason=True)
quantization_list: list[Optional[str]] = [None]
if fp8_available:
quantization_list.extend(("fp8_delayed_scaling", "fp8_current_scaling"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
from utils import dtype_tols, make_recipe, str_to_dtype

# Check if FP8 is supported
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
quantization_list: list[Optional[str]] = [None]
if fp8_available:
quantization_list.extend(("fp8_delayed_scaling", "fp8_current_scaling"))
Expand Down
10 changes: 6 additions & 4 deletions tests/pytorch/distributed/test_numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
if torch.cuda.device_count() < 2:
pytest.skip("Distributed training needs at least 2 GPUs.")

fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available()
nvfp4_available, reason_for_no_nvfp4 = te.is_nvfp4_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available(
return_reason=True
)
nvfp4_available, reason_for_no_nvfp4 = te.is_nvfp4_available(return_reason=True)

TEST_ROOT = Path(__file__).parent.resolve()
NUM_PROCS: int = min(4, torch.cuda.device_count())
Expand Down
10 changes: 6 additions & 4 deletions tests/pytorch/distributed/test_numerics_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
if torch.cuda.device_count() < 2:
pytest.skip("Distributed training needs at least 2 GPUs.")

fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available()
nvfp4_available, reason_for_no_nvfp4 = te.is_nvfp4_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available(
return_reason=True
)
nvfp4_available, reason_for_no_nvfp4 = te.is_nvfp4_available(return_reason=True)

TEST_ROOT = Path(__file__).parent.resolve()
NUM_PROCS: int = min(4, torch.cuda.device_count())
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/distributed/test_torch_fsdp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import torch


fp8_available, reason_for_no_fp8 = te.is_fp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)

NUM_PROCS: int = torch.cuda.device_count()

Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/nvfp4/test_nvfp4_gemm_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from transformer_engine.pytorch.experimental import utils


recipe_available, reason_for_no_recipe = te.is_nvfp4_available()
recipe_available, reason_for_no_recipe = te.is_nvfp4_available(return_reason=True)


def check_nvfp4_gemm_versus_reference(
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/nvfp4/test_nvfp4_module_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from transformer_engine.common import recipe


recipe_available, reason_for_no_recipe = te.is_nvfp4_available()
recipe_available, reason_for_no_recipe = te.is_nvfp4_available(return_reason=True)


class GetRecipes:
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/nvfp4/test_nvfp4_quantize_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from transformer_engine.pytorch.experimental import utils


recipe_available, reason_for_no_recipe = te.is_nvfp4_available()
recipe_available, reason_for_no_recipe = te.is_nvfp4_available(return_reason=True)


def unpack_fp4(x: torch.Tensor) -> torch.Tensor:
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/nvfp4/test_nvfp4_rht_quantize_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import pytest
import torch

recipe_available, reason_for_no_recipe = te.is_nvfp4_available()
recipe_available, reason_for_no_recipe = te.is_nvfp4_available(return_reason=True)


def unpack_fp4(x: torch.Tensor) -> torch.Tensor:
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/nvfp4/test_nvfp4_sr_quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import transformer_engine.pytorch as te
from transformer_engine.pytorch import NVFP4Quantizer

recipe_available, reason_for_no_recipe = te.is_nvfp4_available()
recipe_available, reason_for_no_recipe = te.is_nvfp4_available(return_reason=True)

seed = 12345
torch.manual_seed(seed)
Expand Down
4 changes: 2 additions & 2 deletions tests/pytorch/test_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from utils import make_recipe

# Check supported quantization schemes
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)


# Test cases for loading checkpoint files
Expand Down
4 changes: 2 additions & 2 deletions tests/pytorch/test_cpu_offloading.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from utils import ModelConfig, get_available_attention_backends

# Check supported quantization schemes
fp8_available, _ = te.is_fp8_available()
mxfp8_available, _ = te.is_mxfp8_available()
fp8_available = te.is_fp8_available()
mxfp8_available = te.is_mxfp8_available()

quantization_recipes: Optional[recipe.Recipe] = [None]
if fp8_available:
Expand Down
6 changes: 3 additions & 3 deletions tests/pytorch/test_cuda_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
from utils import ModelConfig, reset_rng_states

# Check if FP8 is supported.
fp8_available, _ = is_fp8_available()
fp8_block_scaling_available, _ = is_fp8_block_scaling_available()
mxfp8_available, _ = is_mxfp8_available()
fp8_available = is_fp8_available()
fp8_block_scaling_available = is_fp8_block_scaling_available()
mxfp8_available = is_mxfp8_available()

# Reset RNG states.
reset_rng_states()
Expand Down
12 changes: 6 additions & 6 deletions tests/pytorch/test_custom_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@pytest.mark.parametrize("module_type", ["Linear", "LayerNormLinear", "OpsLinear", "LayerNormMLP"])
def test_custom_recipe_sanity(module_type):
available, reason = te.is_fp8_available()
available, reason = te.is_fp8_available(return_reason=True)
if not torch.cuda.is_available() or not available:
pytest.skip(f"FP8 unsupported on this device: {reason}")

Expand Down Expand Up @@ -67,7 +67,7 @@ def quantizer_factory(role):


def test_custom_recipe_grouped_linear_sanity():
available, reason = te.is_fp8_available()
available, reason = te.is_fp8_available(return_reason=True)
if not torch.cuda.is_available() or not available:
pytest.skip(f"FP8 unsupported on this device: {reason}")

Expand Down Expand Up @@ -102,7 +102,7 @@ def quantizer_factory(role):


def test_custom_recipe_matches_current_scaling():
available, reason = te.is_fp8_available()
available, reason = te.is_fp8_available(return_reason=True)
if not torch.cuda.is_available() or not available:
pytest.skip(f"FP8 unsupported on this device: {reason}")

Expand Down Expand Up @@ -189,7 +189,7 @@ def quantizer_factory(role):


def test_custom_recipe_ops_linear_2_1_layout():
available, reason = te.is_fp8_available()
available, reason = te.is_fp8_available(return_reason=True)
if not torch.cuda.is_available() or not available:
pytest.skip(f"FP8 unsupported on this device: {reason}")

Expand Down Expand Up @@ -221,7 +221,7 @@ def quantizer_factory(role):


def test_custom_recipe_factory_invocation_counts_and_cycling():
available, reason = te.is_fp8_available()
available, reason = te.is_fp8_available(return_reason=True)
if not torch.cuda.is_available() or not available:
pytest.skip(f"FP8 unsupported on this device: {reason}")

Expand Down Expand Up @@ -270,7 +270,7 @@ def quantizer_factory(role):


def test_factories_return_distinct_instances_and_buffers():
available, reason = te.is_fp8_available()
available, reason = te.is_fp8_available(return_reason=True)
if not torch.cuda.is_available() or not available:
pytest.skip(f"FP8 unsupported on this device: {reason}")

Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/test_float8_blockwise_gemm_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def fp8_blockwise_gemm_supported() -> bool:
supported, _ = te.is_fp8_block_scaling_available()
supported = te.is_fp8_block_scaling_available()
emulated = get_device_compute_capability() >= (10, 0)
return supported and not emulated

Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/test_float8_blockwise_scaling_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tensor_dump_dir_env = os.getenv("NVTE_TEST_BLOCK_CURRENT_SCALING_EXACT_TENSOR_DUMP_DIR")
if tensor_dump_dir_env is not None:
TENSOR_DUMP_DIR = pathlib.Path(tensor_dump_dir_env)
recipe_available, reason_for_no_recipe = te.is_fp8_block_scaling_available()
recipe_available, reason_for_no_recipe = te.is_fp8_block_scaling_available(return_reason=True)
recipe_emulated = get_device_compute_capability() >= (10, 0)


Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/test_float8_current_scaling_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


# Check if FP8 is supported
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)


class GetRecipes:
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/test_float8tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _to_list(x: Union[Iterable, Any]) -> List:
DimsType = Union[Iterable[int], int]

# Check if FP8 is supported
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)


# delayed scaling
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/test_fused_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from transformer_engine.pytorch.utils import gpu_autocast_ctx

# Check if FP8 is supported
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)


class TestFusedOptimizer:
Expand Down
6 changes: 3 additions & 3 deletions tests/pytorch/test_fusible_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
from utils import dtype_tols, make_recipe, quantization_tols, reset_rng_states

# Check for supported quantization schemes
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
nvfp4_available, reason_for_no_nvfp4 = te.is_nvfp4_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
nvfp4_available, reason_for_no_nvfp4 = te.is_nvfp4_available(return_reason=True)

# Supported data types
_dtypes: list[torch.dtype] = [torch.float32, torch.float16]
Expand Down
6 changes: 3 additions & 3 deletions tests/pytorch/test_numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@


# Only run FP8 tests on supported devices.
fp8_available, reason_for_no_fp8 = is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = is_mxfp8_available()
fp8_block_scaling_available, _ = is_fp8_block_scaling_available()
fp8_available, reason_for_no_fp8 = is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = is_mxfp8_available(return_reason=True)
fp8_block_scaling_available = is_fp8_block_scaling_available()

sm_80plus = get_device_compute_capability() >= (8, 0)

Expand Down
4 changes: 2 additions & 2 deletions tests/pytorch/test_onnx_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
# The directory where this file is stored.
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))

fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)

fp8_recipes = []
if mxfp8_available:
Expand Down
8 changes: 5 additions & 3 deletions tests/pytorch/test_permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,9 +1238,11 @@ def test_permutation_mask_map_alongside_probs_empty_input(te_dtype):


# Only run FP8 tests on H100.
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available(
return_reason=True
)
fp8_recipes = [
recipe.MXFP8BlockScaling(),
recipe.DelayedScaling(),
Expand Down
10 changes: 6 additions & 4 deletions tests/pytorch/test_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
import transformer_engine_torch as tex

# Check if FP8 is supported
fp8_available, reason_for_no_fp8 = te.is_fp8_available()
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available()
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available()
fp4_available, reason_for_no_fp4 = te.is_nvfp4_available()
fp8_available, reason_for_no_fp8 = te.is_fp8_available(return_reason=True)
mxfp8_available, reason_for_no_mxfp8 = te.is_mxfp8_available(return_reason=True)
fp8_block_scaling_available, reason_for_no_fp8_block_scaling = te.is_fp8_block_scaling_available(
return_reason=True
)
fp4_available, reason_for_no_fp4 = te.is_nvfp4_available(return_reason=True)


# FP8 per tensor delayed scaling
Expand Down
Loading