Skip to content

Commit 8e3b3da

Browse files
authored
fix unit test to use no grad (#3283)
1 parent ba3ac9f commit 8e3b3da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/quantization/quantize_/workflows/float8/test_float8_tensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def forward(self, x):
8080
class TestFloat8Tensor(TorchAOIntegrationTestCase):
8181
def setUp(self):
8282
self.GPU_DEVICES = ["cuda"] if torch.cuda.is_available() else []
83+
torch.set_grad_enabled(False)
8384

8485
@unittest.skipIf(not torch.cuda.is_available(), "Need CUDA available")
8586
@unittest.skipIf(

0 commit comments

Comments
 (0)