Skip to content

Commit 7e0d3a9

Browse files
committed
Bump hidden dimension size for B300 kernels with Float8Block.
Signed-off-by: Cory Ye <cye@nvidia.com>
1 parent 2e18aba commit 7e0d3a9

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

tests/pytorch/distributed/run_fsdp2_allgather.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
# Fixed model dimensions — this test focuses on allgather correctness, not model flexibility.
3434
_NUM_HEADS = 8
35-
_HEAD_DIM = 64
36-
_HIDDEN_SIZE = _NUM_HEADS * _HEAD_DIM # 512
37-
_FFN_SIZE = _HIDDEN_SIZE * 4 # 2048
35+
_HEAD_DIM = 128
36+
_HIDDEN_SIZE = _NUM_HEADS * _HEAD_DIM
37+
_FFN_SIZE = _HIDDEN_SIZE * 4
3838
_NUM_LAYERS = 2
3939
_BATCH_SIZE = 4
4040
_SEQ_LEN = 32

tests/pytorch/distributed/run_fsdp2_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def dist_print(msg):
102102
def _parse_args(argv=None, namespace=None):
103103
parser = argparse.ArgumentParser(description="Toy example for debugging fully_shard()")
104104
parser.add_argument("--num-heads", type=int, default=8, help="Number of attn. heads")
105-
parser.add_argument("--head-dim", type=int, default=64, help="Attention head size")
105+
parser.add_argument("--head-dim", type=int, default=128, help="Attention head size")
106106
parser.add_argument("--batch-size", type=int, default=16, help="Batch size of input")
107107
parser.add_argument("--seq-length", type=int, default=128, help="Sequence length of input")
108108
parser.add_argument("--params-dtype", type=str, default="float32", help="Parameter dtype.")

transformer_engine/pytorch/tensor/storage/float8_blockwise_tensor_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __new__(
6363
instance._rowwise_scale_inv = rowwise_scale_inv
6464
instance._columnwise_scale_inv = columnwise_scale_inv
6565
instance._is_2D_scaled = is_2D_scaled
66-
instance._default_storage = torch.UntypedStorage(1)
66+
instance._default_storage = torch.UntypedStorage(1, device=torch.cuda.current_device())
6767

6868
return instance
6969

transformer_engine/pytorch/tensor/storage/mxfp8_tensor_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __new__(
101101
instance._quantizer = quantizer.copy() if quantizer is not None else None
102102
instance._fp8_dtype = fp8_dtype
103103
instance._with_gemm_swizzled_scales = with_gemm_swizzled_scales
104-
instance._default_storage = torch.UntypedStorage(1)
104+
instance._default_storage = torch.UntypedStorage(1, device=torch.cuda.current_device())
105105

106106
return instance
107107

transformer_engine/pytorch/tensor/storage/nvfp4_tensor_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __new__(
126126
instance._amax_rowwise = amax_rowwise
127127
instance._amax_columnwise = amax_columnwise
128128
instance._with_gemm_swizzled_scales = with_gemm_swizzled_scales
129-
instance._default_storage = torch.UntypedStorage(1)
129+
instance._default_storage = torch.UntypedStorage(1, device=torch.cuda.current_device())
130130

131131
return instance
132132

0 commit comments

Comments
 (0)