Skip to content

Commit 71f592e

Browse files
authored
nvfp4tensor: improve printing (#3086)
* Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned]
1 parent de92bdc commit 71f592e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

torchao/prototype/mx_formats/nvfp4_tensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ def __new__(
133133
def __repr__(self):
134134
return f"NVFP4Tensor: blockwise_scales: {self._scale_e4m3}, per_tensor_scale: {self._per_tensor_scale}, d: {self.qdata}, d_hp: {self.to_dtype(self._orig_dtype)}"
135135

136+
def _quantization_type(self):
137+
return f"{self._is_swizzled_scales=}, {self.use_triton_kernel=}, {self.act_quant_kwargs=}"
138+
136139
@classmethod
137140
def __torch_dispatch__(cls, func, types, args, kwargs=None):
138141
# Use NVFP4-specific ops table

0 commit comments

Comments
 (0)