From ed7265558f41bce50412aadf7cb67d2b76e30d52 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 9 Aug 2023 10:54:24 +0800 Subject: [PATCH 01/15] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 2aa2bdd..3d2fa7f 100644 --- a/hello.py +++ b/hello.py @@ -1,4 +1,4 @@ print("hello!!!") print("hello!p!!") print("test") -print("222") \ No newline at end of file +print("2221") \ No newline at end of file From 0527f9a360b24b3b1a374a33c98bf4724b09ee8c Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 9 Aug 2023 10:56:39 +0800 Subject: [PATCH 02/15] update Signed-off-by: Sun, Xuehao --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6dd814b..9e60940 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - name: is_perf_reg run: | - if [ ${{ env.is_perf_reg }} == 'true' ]; then + if [ ${{ env.is_perf_reg }} != 'true' ]; then echo "[Performance Regression] Some model performance regression occurred, please check artifacts and reports." exit 1 else From 68aae6b1479c13e97cf0e996bdd68b4364da4a17 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 14:29:04 +0800 Subject: [PATCH 03/15] for test Signed-off-by: Sun, Xuehao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3aa88b9..a1f8619 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# test-azure \ No newline at end of file +- Step 2: Enable pruning functionalities + + \[**Experimental option** \]Modify model and optimizer. From d7e5c8193d6ead2da95064f87b57facd3c7cbb6d Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 14:30:57 +0800 Subject: [PATCH 04/15] for test Signed-off-by: Sun, Xuehao --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index a1f8619..4020966 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ - Step 2: Enable pruning functionalities \[**Experimental option** \]Modify model and optimizer. + + +### Task request description + +- `script_url` (str): The URL to download the model archive. +- `optimized` (bool): If `True`, the model script has already be optimized by `Neural Coder`. +- `arguments` (List\[Union\[int, str\]\], optional): Arguments that are needed for running the model. +- `approach` (str, optional): The optimization approach supported by `Neural Coder`. +- `requirements` (List\[str\], optional): The environment requirements. +- `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. \ No newline at end of file From 2ed88fdc054751f3add9409af2c59b9d5a85d4c3 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 14:45:50 +0800 Subject: [PATCH 05/15] test Signed-off-by: Sun, Xuehao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4020966..77f72cd 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,6 @@ - `arguments` (List\[Union\[int, str\]\], optional): Arguments that are needed for running the model. - `approach` (str, optional): The optimization approach supported by `Neural Coder`. - `requirements` (List\[str\], optional): The environment requirements. -- `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. \ No newline at end of file +- `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. + +## Design Doc for Optimization as a Service \[WIP\] \ No newline at end of file From e7922a0cc8d8964aadf4d38db23a3218dc0a4c64 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 15:43:04 +0800 Subject: [PATCH 06/15] test Signed-off-by: Sun, Xuehao --- hello.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 85dd383..d5ed5ce 100644 --- a/hello.py +++ b/hello.py @@ -8,7 +8,10 @@ all should be the same.'.format( len(str1), len(str2), len(str3) ) - +def get_onnx_model(): + model = torchvision.models.resnet18() + x = Variable(torch.randn(1, 3, 224, 224)) + torch_out = torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) print("hello!!!") print("hello!p!!") print("test") From aba05fc329d7ab118a75aa565d0b224bbeca542f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:42:34 +0000 Subject: [PATCH 07/15] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index d5ed5ce..1ae33a4 100644 --- a/hello.py +++ b/hello.py @@ -11,7 +11,7 @@ def get_onnx_model(): model = torchvision.models.resnet18() x = Variable(torch.randn(1, 3, 224, 224)) - torch_out = torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) + torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) print("hello!!!") print("hello!p!!") print("test") From b6924cf682b04f19d6f756ba21eedb557daabad0 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 10:30:17 +0800 Subject: [PATCH 08/15] test Signed-off-by: Sun, Xuehao --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 77f72cd..c811648 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,7 @@ - `requirements` (List\[str\], optional): The environment requirements. - `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. -## Design Doc for Optimization as a Service \[WIP\] \ No newline at end of file +## Design Doc for Optimization as a Service \[WIP\] + +[intel® security center]: https://www.intel.com/security +[vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html \ No newline at end of file From c92768df358d47fb42014de23616a5a10db049f6 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 10:33:00 +0800 Subject: [PATCH 09/15] test Signed-off-by: Sun, Xuehao --- README.md | 11 ++++++++++- hello.py | 4 ---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c811648..06b961e 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,14 @@ ## Design Doc for Optimization as a Service \[WIP\] +# Security Policy + +## Report a Vulnerability + +Please report security issues or vulnerabilities to the [Intel® Security Center]. + +For more information on how Intel® works to resolve security issues, see +[Vulnerability Handling Guidelines]. + [intel® security center]: https://www.intel.com/security -[vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html \ No newline at end of file +[vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html diff --git a/hello.py b/hello.py index 1ae33a4..77a7df3 100644 --- a/hello.py +++ b/hello.py @@ -8,10 +8,6 @@ all should be the same.'.format( len(str1), len(str2), len(str3) ) -def get_onnx_model(): - model = torchvision.models.resnet18() - x = Variable(torch.randn(1, 3, 224, 224)) - torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) print("hello!!!") print("hello!p!!") print("test") From a4a6eb3c961c9dd6aa6edabc0837cf51a7cbd953 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 11:00:47 +0800 Subject: [PATCH 10/15] test Signed-off-by: Sun, Xuehao --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 06b961e..686d09e 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,6 @@ For more information on how Intel® works to resolve security issues, see [intel® security center]: https://www.intel.com/security [vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html + + +Model inference: Roughly speaking , two key steps are required to get the model's result. The first one is moving the model from the memory to the cache piece by piece, in which, memory bandwidth $B$ and parameter count $P$ are the key factors, theoretically the time cost is $P\*4 /B$. The second one is computation, in which, the device's computation capacity $C$ measured in FLOPS and the forward FLOPs $F$ play the key roles, theoretically the cost is $F/C$. \ No newline at end of file From 4963eda637de058ca63837a67974a9616f2f47bb Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 11:14:25 +0800 Subject: [PATCH 11/15] test Signed-off-by: Sun, Xuehao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 686d09e..fdea7a4 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,6 @@ For more information on how Intel® works to resolve security issues, see [vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html -Model inference: Roughly speaking , two key steps are required to get the model's result. The first one is moving the model from the memory to the cache piece by piece, in which, memory bandwidth $B$ and parameter count $P$ are the key factors, theoretically the time cost is $P\*4 /B$. The second one is computation, in which, the device's computation capacity $C$ measured in FLOPS and the forward FLOPs $F$ play the key roles, theoretically the cost is $F/C$. \ No newline at end of file +Model inference: Roughly speaking , two key steps are required to get the model's result. The first one is moving the model from the memory to the cache piece by piece, in which, memory bandwidth $B$ and parameter count $P$ are the key factors, theoretically the time cost is $P\*4 /B$. The second one is computation, in which, the device's computation capacity $C$ measured in FLOPS and the forward FLOPs $F$ play the key roles, theoretically the cost is $F/C$. + +Text generation: The most famous application of LLMs is text generation, which predicts the next token/word based on the inputs/context. To generate a sequence of texts, we need to predict them one by one. In this scenario, $F\\approx P$ if some operations like bmm are ignored and past key values have been saved. However, the $C/B$ of the modern device could be to **100X,** that makes the memory bandwidth as the bottleneck in this scenario. \ No newline at end of file From d8a6a6586f59eb23dedba1f479a6eb0517e3336e Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 13:47:52 +0800 Subject: [PATCH 12/15] test Signed-off-by: Sun, Xuehao --- hello.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hello.py b/hello.py index 77a7df3..199110c 100644 --- a/hello.py +++ b/hello.py @@ -11,3 +11,4 @@ print("hello!!!") print("hello!p!!") print("test") +print("hello") From 3461c62c609db2c453c0bbe51fcd45b135f121d4 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 13:59:44 +0800 Subject: [PATCH 13/15] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 199110c..543d0ad 100644 --- a/hello.py +++ b/hello.py @@ -9,6 +9,6 @@ len(str1), len(str2), len(str3) ) print("hello!!!") -print("hello!p!!") +print("hello!!") print("test") print("hello") From 6a1048dc41a5f0e0cc0538f0d38acea94d44b6e3 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 14:06:54 +0800 Subject: [PATCH 14/15] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 543d0ad..1161f14 100644 --- a/hello.py +++ b/hello.py @@ -9,6 +9,6 @@ len(str1), len(str2), len(str3) ) print("hello!!!") -print("hello!!") +print("hello!") print("test") print("hello") From 2bcde729ece6bcd7ad517bbe408c4d3589c18de9 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 14:11:09 +0800 Subject: [PATCH 15/15] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 1161f14..83dd454 100644 --- a/hello.py +++ b/hello.py @@ -9,6 +9,6 @@ len(str1), len(str2), len(str3) ) print("hello!!!") -print("hello!") +print("hello") print("test") print("hello")