Skip to content

Commit

Permalink
test(cuda): fix device memory assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Apr 10, 2024
1 parent fab2117 commit 8ecc1d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/model/test_quantize_mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_quantized_mlp_device_memory(weights, dtype, weights_only, device):
# Reload state dict on CPU
b.seek(0)
state_dict = torch.load(b, map_location=torch.device("cpu"), weights_only=weights_only)
assert get_device_memory(device) == 0
assert get_device_memory(device) == base_memory
# Create an empty model and quantize it with the same parameters
with torch.device("meta"):
model_reloaded = MLP(input_features, hidden_features, output_features)
Expand Down

0 comments on commit 8ecc1d3

Please sign in to comment.