GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Updated READMEs for cupy and mpi4py · amd/HPCTrainingExamples@f0980da

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Python
    • cupy
      • README.md
      • intro.py
    • mpi4py
      • README.md
  • README.md
  • tests
    • cupy_check_array_sum.sh
    • mpi4py_cupy.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Python/cupy/README.md‎

Copy file name to clipboardExpand all lines: Python/cupy/README.md
+8-5Lines changed: 8 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
## CuPY Examples
1+
## CuPy Examples
22

3-
### Simple introduction example to CuPY for AMD GPUs
3+
**NOTE**: these exercises have been tested on MI210 and MI300A accelerators using a container environment.
4+
To see details on the container environment (such as operating system and modules available) please see `README.md` on [this](https://github.com/amd/HPCTrainingDock) repo.
5+
6+
### Simple introduction example to CuPy for AMD GPUs
47

58
To run this example,
69

710
```
811
module load cupy
9-
python intro.py
12+
python cupy_array_sum.py
1013
```
1114

1215
The output should look like the following:
@@ -25,7 +28,7 @@ Let's try and see more.
2528

2629
```
2730
export AMD_LOG_LEVEL=1
28-
python intro.py
31+
python cupy_array_sum.py
2932
```
3033

3134
Now our output is:
@@ -45,7 +48,7 @@ The warning is from the AMD logging functions and doesn't impact the run. Now le
4548

4649
```
4750
export AMD_LOG_LEVEL=3
48-
python intro.py
51+
python cupy_array_sum.py
4952
```
5053

5154
Now we see lots of output that shows the hip calls and the operations on the GPU.
Collapse file

‎Python/cupy/intro.py‎

Copy file name to clipboardExpand all lines: Python/cupy/intro.py
-31Lines changed: 0 additions & 31 deletions
This file was deleted.
Collapse file

‎Python/mpi4py/README.md‎

Copy file name to clipboardExpand all lines: Python/mpi4py/README.md
+7-1Lines changed: 7 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
## MPI4PY examples
1+
## MPI4Py examples
2+
3+
**NOTE**: these exercises have been tested on MI210 and MI300A accelerators using a container environment.
4+
To see details on the container environment (such as operating system and modules available) please see `README.md` on [this](https://github.com/amd/HPCTrainingDock) repo.
5+
6+
7+
### Exploring MPI communication with MPI4Py
28

39
First set up the environment
410

Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Please refer to this table of contents to locate the exercises and examples you
4848
3. [`GhostExchange3D_ArrayAssign`](https://github.com/amd/HPCTrainingExamples/tree/main/MPI-examples/GhostExchange/GhostExchange3D_ArrayAssign): a single version of the Ghost Exchange example in 3D, without offloading to GPU.
4949
3. [**ManagedMemory**](https://github.com/amd/HPCTrainingExamples/tree/main/ManagedMemory): programming model exercises, topics covered are APU programming model, OpenMP, performance protability frameworks (Kokkos and RAJA) and discrete GPU programming model. Some HIP examples are also available. [`README`](https://github.com/amd/HPCTrainingExamples/blob/main/ManagedMemory/README.md).
5050
4. [**MLExamples**](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples): this is a rapidly growing directory including a variety of machine learning (ML) and artificial intellingence (AI) related examples.
51-
1. [**Miscelaneous Examples**](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples): a variation of PyTorch's MNIST example code, an array sum test for CuPy, and a communication test for MPI4Py using CuPy. Examples with Tensorflow, Horovod and Huggingface are also included [`README`](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples/README.md).
51+
1. [**Miscelaneous Examples**](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples): PyTorch MNIST examples, Tensorflow with Horovod, and Huggingface transformers [`README`](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples/README.md).
5252
2. [`AI_Surrogates`](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples/AI_Surrogates): this directory contains a variety of Jupyter notebooks that have been developed to show some applications of AI for science using surrogate models. There are no READMEs for these examples at the moment and we suggest users work directly with the Jupyter notebooks for details.
5353
3. [`PyTorch_Profiling`](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples/PyTorch_Profiling): a colleciton of examples to show how to profile PyTorch using AMD tools. [`README`](https://github.com/amd/HPCTrainingExamples/blob/main/MLExamples/PyTorch_Profiling/README.md).
5454
4. [`RAG_LangChainDemo`](https://github.com/amd/HPCTrainingExamples/tree/main/MLExamples/RAG_LangChainDemo): a RAG Chatobot Demo application. [`README`](https://github.com/amd/HPCTrainingExamples/blob/main/MLExamples/RAG_LangChainDemo/README.md).
@@ -91,8 +91,11 @@ Please refer to this table of contents to locate the exercises and examples you
9191
20. [`Affinity`](https://github.com/amd/HPCTrainingExamples/tree/main/Affinity): an example to show how to set proper affinity to CPU cores and GPUs. [`README`](https://github.com/amd/HPCTrainingExamples/blob/main/Affinity/README.md).
9292
21. [**login_info**](https://github.com/amd/HPCTrainingExamples/tree/main/login_info)
9393
1. [***AAC***](https://github.com/amd/HPCTrainingExamples/tree/main/login_info/AAC): instructions on how to log in to the AMD Accelerator Cloud (AAC) resource. [`README`](https://github.com/amd/HPCTrainingExamples/tree/main/login_info/AAC/README.md).
94-
22. [**Doc**](https://github.com/amd/HPCTrainingExamples/tree/main/Doc): directory with LaTeX and PDF documents that contain some of the most relevant README files properly formatted for ease of reading. The PDF document is obtained building the LaTeX document. Note: the document may be out of date compared to the READMEs in the repo which are most current source of information for these exercises.
95-
23. [`tests`](https://github.com/amd/HPCTrainingExamples/tree/main/tests): this directory contains a huge number of test scripts aimed at testing the installation of the software provided by the scripts in the companing repo [`HPCTrainingDock`](https://github.com/amd/HPCTrainingDock).
94+
22. [`Python`](https://github.com/amd/HPCTrainingExamples/tree/main/Python): growing directory of material on Python examples.
95+
1. [`cupy`](https://github.com/amd/HPCTrainingExamples/tree/main/Python/cupy): an example showing how to perform array sums on GPU and CPU using CuPy and NumPy. [`README`](https://github.com/amd/HPCTrainingExamples/blob/main/Python/cupy/README.md).
96+
2. [`mpi4py`](https://github.com/amd/HPCTrainingExamples/blob/main/Python/mpi4py): an example showing MPI communication in Python, leveraging MPI4Py. [`README`](https://github.com/amd/HPCTrainingExamples/blob/main/Python/mpi4py/README.md).
97+
23. [**Doc**](https://github.com/amd/HPCTrainingExamples/tree/main/Doc): directory with LaTeX and PDF documents that contain some of the most relevant README files properly formatted for ease of reading. The PDF document is obtained building the LaTeX document. Note: the document may be out of date compared to the READMEs in the repo which are most current source of information for these exercises.
98+
24. [`tests`](https://github.com/amd/HPCTrainingExamples/tree/main/tests): this directory contains a huge number of test scripts aimed at testing the installation of the software provided by the scripts in the companing repo [`HPCTrainingDock`](https://github.com/amd/HPCTrainingDock).
9699

97100

98101
## Run the Tests
@@ -111,7 +114,7 @@ You can also run a subset of the whole test suite by specifying the subset you a
111114

112115
## Additional Resources
113116

114-
We recommend users also check out the [`rocm-examples`](https://github.com/rocm/rocm-examples) Github repo, that has a lot of content on HIP and ROCm libraries.
117+
We recommend users also check out the [`rocm-examples`](https://github.com/rocm/rocm-examples) Github repo, that has a lot of content specific to HIP and ROCm libraries.
115118

116119
## Feedback
117120
We welcome your feedback and contributions, feel free to use this repo to bring up any issues or submit pull requests.
Collapse file

‎tests/cupy_check_array_sum.sh‎

Copy file name to clipboardExpand all lines: tests/cupy_check_array_sum.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module load cupy
1313

1414
REPO_DIR="$(dirname "$(dirname "$(readlink -fm "$0")")")"
1515

16-
pushd $REPO_DIR/MLExamples/
16+
pushd $REPO_DIR/Python/cupy
1717

1818
python3 cupy_array_sum.py
1919

Collapse file

‎tests/mpi4py_cupy.sh‎

Copy file name to clipboardExpand all lines: tests/mpi4py_cupy.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ module purge
6262
module load ${MODULE_NAME}
6363
module load cupy
6464

65-
python3 ${REPO_DIR}/MLExamples/mpi4py_cupy.py
65+
python3 ${REPO_DIR}/Python/mpi4py/mpi4py_cupy.py
6666

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.