From 4ca616e6d453e429f2db736bc4e756d6eaa93c26 Mon Sep 17 00:00:00 2001 From: "Tugsbayasgalan (Tugsuu) Manlaibaatar" Date: Thu, 8 Aug 2024 01:45:12 +0000 Subject: [PATCH] Disable sparse tests in export (#132824) Summary: Dynamo doesn't trace through sparse tensors in fbcode. So we should disable tests that run sparse tensors in export. We should do this to make the CI green internally. Test Plan: Before: Tests finished: Pass 1409. Fail 71. Fatal 0. Skip 90. Build failure 0 After: Tests finished: Pass 1408. Fail 0. Fatal 0. Skip 162. Build failure 0 Differential Revision: D60870543 Pull Request resolved: https://github.com/pytorch/pytorch/pull/132824 Approved by: https://github.com/BoyuanFeng --- test/export/test_sparse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/export/test_sparse.py b/test/export/test_sparse.py index 09aaa334d06..596404b8ed0 100644 --- a/test/export/test_sparse.py +++ b/test/export/test_sparse.py @@ -7,6 +7,7 @@ import sys import unittest import torch +from torch._dynamo.config import is_fbcode from torch._subclasses.fake_tensor import FakeTensor from torch.testing._internal.common_utils import ( instantiate_parametrized_tests, @@ -79,6 +80,7 @@ class SparseActivationCSR(torch.nn.Module): # +@unittest.skipIf(is_fbcode(), "See torch._dynamo.config") class TestSparseProp(TestCase): def setUp(self): TestCase.setUp(self)