Tags: cupkk/ao
Tags
Merge branch 'pytorch:main' into enable-low-bit-optim-in-xpu-ci
Fix XPU blockwise _scaled_mm: scale reshape + output dtype Two related fixes for the XPU blockwise path (PerBlock[1,128] act, PerBlock[128,128] wt) routed through torch._scaled_mm: 1. input_scale reshape: preprocess_scale flattens the 3D scale (1, seq, K/128) into (M*K/128, 1), and .reshape(-1, scale.shape[-1]) was a no-op because shape[-1]==1. Use inpt_data.shape[0] to reconstruct the correct (M, K/128) shape. 2. output_dtype: the refactored code passed input_scale.dtype (float32 after preprocess_scale) to _scaled_mm, producing float32 output. Restore input_tensor.dtype (bfloat16) to match the non-blockwise path and the original fe6c37f behavior.
[xpu][mx][test] Enable multicard tests for xpu Signed-off-by: Ula Golowicz <urszula.golowicz@intel.com>
PreviousNext