Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/unit/checkpoint/test_convert_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ def test_convert_zero_checkpoint_to_fp32_state_dict(self, tmpdir):
assert tensor.dtype == torch.bfloat16
torch.testing.assert_close(tensor.float(), state_dict[name], rtol=5e-3, atol=5e-3)

fp32_size = (fp32_save_dir / 'pytorch_model.bin').stat().st_size
bf16_size = (bf16_save_dir / 'pytorch_model.bin').stat().st_size
fp32_size = (fp32_save_dir / 'pytorch_model.bin').stat().size
bf16_size = (bf16_save_dir / 'pytorch_model.bin').stat().size
assert bf16_size < fp32_size * 0.6
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ def test_float_int8_quantization(self):
reset_random()
quantization_test_helper(torch.float32, 8)

@pytest.mark.skipif(device == 'cpu', reason='CPU does support FP16 GEMM')
def test_half_int8_quantization(self):
reset_random()
quantization_test_helper(torch.float16, 8)
Expand Down
Loading