From 2132ab65d87177c25f469ade523c8d221c4194b8 Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Fri, 18 Oct 2024 09:35:57 +0200 Subject: [PATCH 1/4] [TESTS] Update pytorch version to 2.5.0 --- tests/requirements_pytorch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/requirements_pytorch b/tests/requirements_pytorch index 0bda286eb83252..5284765f3b0ed0 100644 --- a/tests/requirements_pytorch +++ b/tests/requirements_pytorch @@ -3,11 +3,11 @@ # optimum still requires numpy<2.0.0 numpy==1.26.4; python_version < "3.12" numpy==2.1.1; python_version >= "3.12" -torch==2.4.1; platform_system != "Darwin" or platform_machine != "x86_64" +torch==2.5.0; platform_system != "Darwin" or platform_machine != "x86_64" torch==2.2.2; platform_system == "Darwin" and platform_machine == "x86_64" --extra-index-url https://download.pytorch.org/whl/cpu -torchvision==0.19.1; platform_system != "Darwin" or platform_machine != "x86_64" +torchvision==0.20.0; platform_system != "Darwin" or platform_machine != "x86_64" torchvision==0.17.2; platform_system == "Darwin" and platform_machine == "x86_64" # transformers 4.45.1 is available # but optimum still requires <4.45.0 From 23a9489a206ffb43cc71f821726d4e9c9782c3d5 Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Fri, 18 Oct 2024 10:45:24 +0200 Subject: [PATCH 2/4] Update requirements_pytorch --- tests/requirements_pytorch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/requirements_pytorch b/tests/requirements_pytorch index 5284765f3b0ed0..d1033feb885352 100644 --- a/tests/requirements_pytorch +++ b/tests/requirements_pytorch @@ -9,6 +9,8 @@ torch==2.2.2; platform_system == "Darwin" and platform_machine == "x86_64" torchvision==0.20.0; platform_system != "Darwin" or platform_machine != "x86_64" torchvision==0.17.2; platform_system == "Darwin" and platform_machine == "x86_64" +torchaudio==2.5.0; platform_system != "Darwin" or platform_machine != "x86_64" +torchaudio==2.2.2; platform_system == "Darwin" and platform_machine == "x86_64" # transformers 4.45.1 is available # but optimum still requires <4.45.0 transformers==4.44.2 @@ -33,8 +35,6 @@ sentencepiece==0.2.0 soundfile==0.12.1 super-image==0.1.7; python_version < "3.12" timm==1.0.8 -torchaudio==2.4.1; platform_system != "Darwin" or platform_machine != "x86_64" -torchaudio==2.2.2; platform_system == "Darwin" and platform_machine == "x86_64" wheel==0.44.0 PyYAML==6.0.2 kornia==0.7.3 From 1823524d469cb548bb107e0b8a483b80e6fafade Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Tue, 22 Oct 2024 11:06:40 +0200 Subject: [PATCH 3/4] Support safe_softmax --- src/frontends/pytorch/src/op_table.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontends/pytorch/src/op_table.cpp b/src/frontends/pytorch/src/op_table.cpp index 5d63a6dc037b14..5e0187f1a1918a 100644 --- a/src/frontends/pytorch/src/op_table.cpp +++ b/src/frontends/pytorch/src/op_table.cpp @@ -742,6 +742,7 @@ const std::unordered_map get_supported_ops_fx() { {"aten._native_batch_norm_legit.no_stats", op::translate_batch_norm_legit_no_stats_fx}, {"aten._native_batch_norm_legit_functional.default", op::translate_batch_norm_legit_fx}, {"aten._native_batch_norm_legit_no_training.default", op::translate_batch_norm_legit_no_training_fx}, + {"aten._safe_softmax.default", op::translate_softmax_fx}, {"aten._scaled_dot_product_flash_attention.default", op::translate_scaled_dot_product_attention_fx}, {"aten._scaled_dot_product_flash_attention_for_cpu.default", op::translate_scaled_dot_product_attention_fx}, {"aten._softmax.default", op::translate_softmax_fx}, From 5aefe7c81f46cc58d8e5b0a6fc68f78bc8efe6d1 Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Fri, 25 Oct 2024 16:50:28 +0200 Subject: [PATCH 4/4] Update constraints.txt --- tests/constraints.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/constraints.txt b/tests/constraints.txt index 616aea79c82153..9c0d08a6fe9101 100644 --- a/tests/constraints.txt +++ b/tests/constraints.txt @@ -33,5 +33,5 @@ transformers~=4.44.0 easyocr==1.7.2 --extra-index-url https://download.pytorch.org/whl/cpu -torch~=2.4.1; platform_system != "Darwin" or platform_machine != "x86_64" +torch~=2.5.0; platform_system != "Darwin" or platform_machine != "x86_64" torch~=2.2.0; platform_system == "Darwin" and platform_machine == "x86_64"