File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -877,7 +877,8 @@ def _test_lin_weight_subclass_api_impl(
877877 api (mod )
878878
879879 # test get_plain()
880- mod [0 ].weight .tensor_impl .get_plain ()
880+ if hasattr (mod [0 ].weight , "tensor_impl" ):
881+ mod [0 ].weight .tensor_impl .get_plain ()
881882
882883 test = mod (x )
883884 self .assertGreater (
Original file line number Diff line number Diff line change @@ -235,12 +235,15 @@ def from_hp_to_intx(
235235 compute_dtype = compute_dtype ,
236236 device = device ,
237237 verbose = False ,
238- raw_output = not isinstance (_layout , TensorCoreTiledLayout ),
238+ raw_output = not isinstance (
239+ _layout , (TensorCoreTiledLayout , PlainLayout )
240+ ),
239241 # raw_output=False is basically the 'convert to TensorCoreTiledLayout zero_point version' option (add scale*midpoint)
240242 # note in choose_qparams_affine, preserve_zero = False does this same thing while also controlling whether
241243 # zero is preserved.
242244 # TODO uncouple preserve_zero and conversion of zero_point to TensorCoreTiledLayout version
243245 # TODO move the conversion of zero_point out of quant_primitives and into TensorCoreTiledLayout.from_plain
246+ # TODO change PlainLayout to use raw_output.
244247 )
245248 data = data .to (target_dtype )
246249 else :
You can’t perform that action at this time.
0 commit comments