From bded20341442fef6c2da0669a2721b4667fff879 Mon Sep 17 00:00:00 2001 From: JackCaoG Date: Tue, 28 May 2024 21:23:32 +0000 Subject: [PATCH 1/3] add test for onehot to make sure no fallback --- test/test_operations.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test_operations.py b/test/test_operations.py index f95c387f435..6adeee09aac 100644 --- a/test/test_operations.py +++ b/test/test_operations.py @@ -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): From 266e2a4eb29a074ca503ca29e392ee6eff83579e Mon Sep 17 00:00:00 2001 From: JackCaoG Date: Tue, 28 May 2024 21:23:56 +0000 Subject: [PATCH 2/3] pin --- .torch_pin | 1 + 1 file changed, 1 insertion(+) create mode 100644 .torch_pin diff --git a/.torch_pin b/.torch_pin new file mode 100644 index 00000000000..534cf5aed54 --- /dev/null +++ b/.torch_pin @@ -0,0 +1 @@ +#127335 From c922188c55102d8c8001265df1c2846c9bc0bec4 Mon Sep 17 00:00:00 2001 From: JackCaoG <59073027+JackCaoG@users.noreply.github.com> Date: Wed, 29 May 2024 14:40:47 -0700 Subject: [PATCH 3/3] Delete .torch_pin --- .torch_pin | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .torch_pin diff --git a/.torch_pin b/.torch_pin deleted file mode 100644 index 534cf5aed54..00000000000 --- a/.torch_pin +++ /dev/null @@ -1 +0,0 @@ -#127335