Tune Vortex NVFP4 scale geometry
This commit is contained in:
parent
1cc0ffdd00
commit
1fec77d2e9
1 changed files with 2 additions and 2 deletions
|
|
@ -51,10 +51,10 @@ def _env_int(name: str, default: int) -> int:
|
|||
|
||||
|
||||
def _vortex_scale_geometry(numel: int) -> tuple[int, int]:
|
||||
threads = _env_int("H3_NVFP4_SCALE_THREADS", 256)
|
||||
threads = _env_int("H3_NVFP4_SCALE_THREADS", 128)
|
||||
if threads not in {128, 256, 512}:
|
||||
raise ValueError(f"H3_NVFP4_SCALE_THREADS must be 128, 256, or 512, got {threads}")
|
||||
default_blocks = min((numel + threads - 1) // threads, 4096)
|
||||
default_blocks = min((numel + threads - 1) // threads, 256)
|
||||
blocks = _env_int("H3_NVFP4_SCALE_BLOCKS", default_blocks)
|
||||
if blocks <= 0:
|
||||
raise ValueError(f"H3_NVFP4_SCALE_BLOCKS must be positive, got {blocks}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue