Skip to content

Commit 913084a

Browse files
eleemhuiaemorabrkjmorajiEdgar097
authored
UV conversion Features-and-Functionality dir (#2)
* Migration to uv for intel_pytorch_gpu_inference_optimization_with_amp * uv for genetic_algorithms_on_gpu_using_intel_distribution_of_python_dpnp * uv for quantizing_transformer_model_using_intel_extension_for_transformers_(itrex) Signed-off-by: Mora Jimenez, Kevin <[email protected]> * working tests with uv: tensorflow-amx-bf16-inference and training * uv for IntelPyTorch_TrainingOptimization_AMX_BF16 * uv set up for IntelPython_Numpy_Numba_dpnp_kNN * uv for tensorflow_transformer_with_advanced_matrix_extensions_bfloat16_mixed_precision_learning. Signed-off-by: Mora Jimenez, Kevin <[email protected]> * add uv to IntelPython_XGBoost_Performance * Fix: add pip install uv to samples.json AMX_BF16 and Numpy_Numba_dpnp Signed-off-by: Mora Jimenez, Kevin <[email protected]> Co-authored-by: Mora Brenes, Allan <[email protected]> Co-authored-by: Mora Jimenez, Kevin <[email protected]> Co-authored-by: Edgar Parra <[email protected]>
1 parent eaceca8 commit 913084a

File tree

33 files changed

+25605
-72
lines changed

33 files changed

+25605
-72
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[project]
2+
name = "intel_pytorch_gpu_inference_optimization_with_amp"
3+
version = "0.1.0"
4+
description = "This sample illustrates how to use AMP BFLOAT16 in PyTorch on Intel dGPU"
5+
authors = [
6+
{name = "Copyright © 2023 Intel Corporation"}
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.md"
10+
requires-python = ">=3.11"
11+
dependencies = [
12+
"deepspeed==0.15.4",
13+
"intel-extension-for-pytorch==2.5.10",
14+
"matplotlib>=3.10.1",
15+
"neural-compressor==3.1.1",
16+
"numpy==1.26.4",
17+
"oneccl-bind-pt==2.5.0",
18+
"requests>=2.32.3",
19+
"torch==2.5.1",
20+
"torchaudio==2.5.1",
21+
"torchvision==0.20.1",
22+
"tqdm>=4.67.1",
23+
]
24+
25+
26+
[dependency-groups]
27+
dev = [
28+
"ipykernel>=6.29.5",
29+
"jupyter>=1.1.1",
30+
]
31+
32+
[[tool.uv.index]]
33+
url = "https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/"

AI-and-Analytics/Features-and-Functionality/IntelPyTorch_GPU_InferenceOptimization_with_AMP/sample.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
{
1414
"id": "intel pytorch gpu inference optimization with amp",
1515
"steps": [
16-
"source /intel/oneapi/intelpython/bin/activate",
17-
"source activate pytorch-gpu",
18-
"pip install -r requirements.txt",
19-
"pip install jupyter ipykernel",
20-
"python -m ipykernel install --user --name=pytorch-gpu",
21-
"python IntelPyTorch_GPU_InferenceOptimization_with_AMP.py"
16+
"pip install uv==0.6.3",
17+
"uv sync",
18+
"uv run IntelPyTorch_GPU_InferenceOptimization_with_AMP.py"
2219
]
2320
}
2421
]

AI-and-Analytics/Features-and-Functionality/IntelPyTorch_GPU_InferenceOptimization_with_AMP/uv.lock

Lines changed: 2804 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[project]
2+
name = "intelpytorch-trainingoptimizations-amx-bf16"
3+
version = "0.1.0"
4+
description = "This sample illustrates how to train a PyTorch model using Advanced Matrix Extensions Bfloat16"
5+
authors = [
6+
{name = "Copyright © 2020 Intel Corporation"}
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.md"
10+
requires-python = ">=3.11"
11+
dependencies = [
12+
"deepspeed==0.15.4",
13+
"intel-extension-for-pytorch==2.5.0",
14+
"ipywidgets>=8.1.5",
15+
"jupyter>=1.1.1",
16+
"matplotlib>=3.10.1",
17+
"neural-compressor==3.1.1",
18+
"numpy==1.26.4",
19+
"oneccl-bind-pt==2.5.0",
20+
"onnxruntime==1.19.2",
21+
"py-cpuinfo>=9.0.0",
22+
"setuptools>=75.8.2",
23+
"torch==2.5.0",
24+
"torchaudio==2.5.0",
25+
"torchvision==0.20.0",
26+
"transformers>=4.49.0",
27+
]
28+
29+
[tool.uv.sources]
30+
oneccl-bind-pt = { index = "intel" }
31+
32+
[[tool.uv.index]]
33+
name = "intel"
34+
url = "https://pytorch-extension.intel.com/release-whl/stable/cpu/cn/"
35+
36+
[dependency-groups]
37+
dev = [
38+
"ipykernel>=6.29.5",
39+
]

AI-and-Analytics/Features-and-Functionality/IntelPyTorch_TrainingOptimizations_AMX_BF16/sample.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
{
1414
"id": "intel amx bf16 training",
1515
"steps": [
16-
"source /intel/oneapi/intelpython/bin/activate",
17-
"conda activate pytorch",
18-
"python -m pip install -r requirements.txt",
19-
"python -m ipykernel install --user --name=pytorch",
20-
"python pytorch_training_avx512_bf16.py",
21-
"python pytorch_training_amx_bf16.py",
22-
"jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook IntelPyTorch_TrainingOptimizations_AMX_BF16.ipynb"
16+
"pip install uv==0.6.3",
17+
"uv venv",
18+
"uv sync",
19+
"uv run python -m ipykernel install --user --name=torch_trainOpt_AMX_BF16",
20+
"uv run python pytorch_training_avx512_bf16.py",
21+
"uv run python pytorch_training_amx_bf16.py",
22+
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=torch_trainOpt_AMX_BF16 --to notebook IntelPyTorch_TrainingOptimizations_AMX_BF16.ipynb"
2323
]
2424
}
2525
]

AI-and-Analytics/Features-and-Functionality/IntelPyTorch_TrainingOptimizations_AMX_BF16/uv.lock

Lines changed: 2806 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[project]
2+
name = "genetic_algorithms_on_gpu_using_intel_distribution_of_python_dpnp"
3+
version = "0.1.0"
4+
description = "This sample shows how to implement general genetic algorithm (GA) and offload computation to GPU using dpnp."
5+
authors = [
6+
{name = "Copyright © 2023 Intel Corporation"}
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.md"
10+
requires-python = ">=3.11"
11+
dependencies = [
12+
"dpnp>=0.16.3",
13+
"matplotlib>=3.10.1",
14+
]
15+
16+
17+
[dependency-groups]
18+
dev = [
19+
"ipykernel>=6.29.5",
20+
"jupyter>=1.1.1",
21+
]
22+
23+
[[tool.uv.index]]
24+
url = "https://software.repos.intel.com/python/pypi"

AI-and-Analytics/Features-and-Functionality/IntelPython_GPU_dpnp_Genetic_Algorithm/sample.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"linux": [
1313
{
1414
"env": [
15-
"source /intel/oneapi/intelpython/bin/activate",
16-
"conda activate base",
17-
"pip install -r requirements.txt"
15+
"pip install uv==0.6.3",
16+
"uv sync"
17+
1818
],
1919
"id": "idp_ga_dpnp_py",
2020
"steps": [
21-
"python IntelPython_GPU_dpnp_Genetic_Algorithm.py"
21+
"uv run IntelPython_GPU_dpnp_Genetic_Algorithm.py"
2222
]
2323
}
2424
]

0 commit comments

Comments
 (0)