Skip to content

Commit

Permalink
[TEST] Temporary disable fp16 type_as test for PyTorch Frontend (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and trevor-m committed Jun 18, 2020
1 parent 7479041 commit 8eb41c1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/python/frontend/pytorch/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,13 @@ def forward(self, *args):
def test_type_as():
torch.set_grad_enabled(False)
input_shape = [1, 3]

def _create_module(dtype):
class TypeAs(Module):
def forward(self, *args):
expected_type_tensor = torch.zeros(1, 3, dtype=dtype)
return args[0].type_as(expected_type_tensor)

return TypeAs()

input_data = torch.randn(input_shape).float()
Expand All @@ -868,7 +868,10 @@ def forward(self, *args):
except Exception as e:
# If GPU is not enabled in TVM, skip the fp16 test.
pass


# Temporary disable fp16 test
check_fp16 = False

if check_fp16:
verify_model(_create_module(torch.float16), input_data=input_data)

Expand Down

0 comments on commit 8eb41c1

Please sign in to comment.