Skip to content
Merged
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
13 changes: 13 additions & 0 deletions test/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,19 @@ def test_fn(t, c):
), dtype=torch.int64)
self.runAtenTest([token_type_ids, cat_ids], test_fn)

def test_one_hot_no_fallback(self):

def test_fn(t):
met.clear_all()
res = F.one_hot(t, num_classes=5)
# make sure there is no graph break
assert 'aten::' not in met.short_metrics_report()
return res

t1 = torch.arange(0, 5) % 3

self.runAtenTest([t1], test_fn)

@skipIfFunctionalizationEnabled("views do not exist")
def test_save_view_alias_check(self):

Expand Down