From 32b4333f4c6661f9690749df20322217c4785ca8 Mon Sep 17 00:00:00 2001 From: savsrini Date: Tue, 23 Jul 2024 16:19:50 -0700 Subject: [PATCH 1/3] Remove python dependency in cpp example --- .../cpp/resnet_cifar/resnet_cifar.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp b/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp index 843056fd..bd8c0048 100644 --- a/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp +++ b/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp @@ -163,10 +163,6 @@ bool isValidEP(const std::string& option) { int main(int argc, char* argv[]) { - const char* env_val = getenv("CONDA_PREFIX"); - const char* env_name = "PYTHONHOME"; - _putenv_s(env_name, env_val); - const string data_dir = "./data/cifar-10-batches-bin/test_batch.bin"; const string output_folder = "images/"; std::filesystem::create_directory(output_folder); @@ -300,9 +296,6 @@ int main(int argc, char* argv[]) { cout << "Predicted label is " << results[n].first << " and actual label is " << results[n].second << endl; } - const char* temp = ""; - _putenv_s(env_name, temp); - return 0; } From 27e993fd3acb0632081e765a540bce27a71a5e41 Mon Sep 17 00:00:00 2001 From: savsrini Date: Thu, 25 Jul 2024 19:57:04 -0700 Subject: [PATCH 2/3] Revert "Remove python dependency in cpp example" This reverts commit 32b4333f4c6661f9690749df20322217c4785ca8. --- .../cpp/resnet_cifar/resnet_cifar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp b/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp index bd8c0048..843056fd 100644 --- a/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp +++ b/tutorial/getting_started_resnet/cpp/resnet_cifar/resnet_cifar.cpp @@ -163,6 +163,10 @@ bool isValidEP(const std::string& option) { int main(int argc, char* argv[]) { + const char* env_val = getenv("CONDA_PREFIX"); + const char* env_name = "PYTHONHOME"; + _putenv_s(env_name, env_val); + const string data_dir = "./data/cifar-10-batches-bin/test_batch.bin"; const string output_folder = "images/"; std::filesystem::create_directory(output_folder); @@ -296,6 +300,9 @@ int main(int argc, char* argv[]) { cout << "Predicted label is " << results[n].first << " and actual label is " << results[n].second << endl; } + const char* temp = ""; + _putenv_s(env_name, temp); + return 0; } From 0ef81c3db2a9a0315cc430c64b8315de18d3f4ad Mon Sep 17 00:00:00 2001 From: savsrini Date: Thu, 25 Jul 2024 20:10:05 -0700 Subject: [PATCH 3/3] update requirements for stable diffusion --- demo/NPU-GPU-Pipeline/stable_diffusion/requirements-common.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/NPU-GPU-Pipeline/stable_diffusion/requirements-common.txt b/demo/NPU-GPU-Pipeline/stable_diffusion/requirements-common.txt index 9a329381..52910881 100644 --- a/demo/NPU-GPU-Pipeline/stable_diffusion/requirements-common.txt +++ b/demo/NPU-GPU-Pipeline/stable_diffusion/requirements-common.txt @@ -5,4 +5,4 @@ pillow protobuf==3.20.3 # protobuf 4.x aborts with OOM when optimizing unet tabulate torch -transformers +transformers<4.43.0