Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intro to HIP Programming Model #3739

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
5734902
start Intro effort
randyh62 Jan 15, 2025
2ac0f3a
programming model update
randyh62 Jan 28, 2025
f727275
update programming model
randyh62 Feb 5, 2025
8a23c75
update content base don Adel feedback, minus Execution Model
randyh62 Feb 9, 2025
0581937
Update wordlist
randyh62 Feb 9, 2025
7233ab6
warpSize
randyh62 Feb 9, 2025
abd15a7
SWDEV-501779 - add macro alias for hip for fp16
cjatin Dec 4, 2024
3bb01ce
Add note to README to point to HIP documentation.
randyh62 Dec 12, 2024
6e10f45
Bump rocm-docs-core[api_reference] from 1.10.0 to 1.11.0 in /docs/sphinx
dependabot[bot] Dec 6, 2024
f216add
Minor fix in unified memory page
neon60 Dec 6, 2024
1192231
Docs: Update device memory pages
MKKnorr Nov 28, 2024
787bb66
Minor fixes
neon60 Dec 15, 2024
f24c9d5
Documentation build error fix
neon60 Dec 19, 2024
cb3aa35
Bump rocm-docs-core[api_reference] from 1.11.0 to 1.12.0 in /docs/sphinx
dependabot[bot] Dec 24, 2024
071c42a
Bump rocm-docs-core[api_reference] from 1.12.0 to 1.12.1 in /docs/sphinx
dependabot[bot] Jan 3, 2025
6c72149
Bump rocm-docs-core[api_reference] from 1.12.1 to 1.13.0 in /docs/sphinx
dependabot[bot] Jan 7, 2025
821bb39
Docs: Refactor cpp_language_extensions and cpp_language_support
MKKnorr Nov 21, 2024
f44e3c8
Docs: Fix device memory refs
MKKnorr Jan 8, 2025
52ca23f
Docs: Update example references
MKKnorr Jan 9, 2025
153675a
Add asynchronous execution documentation page
neon60 Jan 14, 2025
f09a175
Update terms.md
randyh62 Jan 15, 2025
4d2c3b3
Update hip_porting_guide.md
randyh62 Jan 15, 2025
2d31e9b
Update debugging_env.rst
randyh62 Jan 15, 2025
d1e2e90
Update hip_rtc.md
randyh62 Jan 15, 2025
42d09cb
Bump rocm-docs-core[api_reference] from 1.13.0 to 1.14.1 in /docs/sphinx
dependabot[bot] Jan 22, 2025
62f4330
Docs: Add local spellcheck file for spellcheck workflow
adeljo-amd Jan 20, 2025
90388dd
Bump rocm-docs-core[api_reference] from 1.14.1 to 1.15.0 in /docs/sphinx
dependabot[bot] Jan 30, 2025
8e7a935
Add virtual aliases support section
neon60 Jan 31, 2025
ad2c374
added compilation cache content
randyh62 Jan 31, 2025
467dff9
Docs: Replace terms.md page with page that provides example of API ma…
adeljo-amd Jan 22, 2025
f504a3d
Update README.md
sweiglbosker Feb 5, 2025
3492c76
Bump sphinxcontrib-doxylink from 1.12.3 to 1.12.4 in /docs/sphinx
dependabot[bot] Feb 7, 2025
a12dda4
wordlist
randyh62 Feb 9, 2025
8757df1
wordlist again
randyh62 Feb 9, 2025
7e49755
wordlist redux
randyh62 Feb 9, 2025
da1b0a2
wordlist etc.
randyh62 Feb 9, 2025
6cba8ac
complete memory_model update
randyh62 Feb 9, 2025
1f6f740
started Execution model
randyh62 Feb 9, 2025
de0bbd7
remove Introduxtory content
randyh62 Feb 11, 2025
0d7a6be
Add references from Introduction
randyh62 Feb 11, 2025
c51f87a
edit index and TOC
randyh62 Feb 11, 2025
1453158
Add code examples and images
randyh62 Feb 12, 2025
db9e07b
Address Adel comments
randyh62 Feb 12, 2025
973fd34
Add Istvan links
randyh62 Feb 14, 2025
264a83e
update images
randyh62 Feb 14, 2025
e3baf1e
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
795dc5a
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
0892872
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
2a96482
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
b134939
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
7bca8bf
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
554f987
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
e8e0409
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
c635547
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
de3a53b
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
e2af3c0
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
bae187f
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
6a97e2b
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
2ee7196
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
cee2cbc
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
fe1f2f9
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
4615093
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
f1b6afd
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
7ae9824
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
a9b83d5
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
7426018
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
5179b48
Apply suggestions from code review
randyh62 Feb 14, 2025
e1c6722
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
e258e0d
Apply suggestions from code review
randyh62 Feb 14, 2025
ea1e707
add borders to images
randyh62 Feb 17, 2025
8eed13b
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
7b07c94
Update docs/understand/programming_model.rst
randyh62 Feb 14, 2025
82ab820
Update programming_model.rst
randyh62 Feb 14, 2025
9f53125
Update docs/understand/programming_model.rst
lpaoletti Feb 18, 2025
fc93982
Update docs/understand/programming_model.rst
randyh62 Feb 18, 2025
c93b87f
Update docs/understand/programming_model.rst
randyh62 Feb 18, 2025
24922d7
Update .wordlist.txt
randyh62 Feb 19, 2025
49ad2d8
Update docs/understand/programming_model.rst
randyh62 Feb 19, 2025
9b29f17
update CPU v GPU image
randyh62 Feb 26, 2025
d71da38
Update docs/understand/programming_model.rst
randyh62 Mar 7, 2025
56dcb74
Update docs/understand/programming_model.rst
randyh62 Mar 7, 2025
fe632eb
Update docs/understand/programming_model.rst
randyh62 Mar 7, 2025
283b86e
Update programming_model.rst
randyh62 Mar 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.*
!.gitignore
!.spellcheck.local.yaml
*.o
*.exe
*.swp
Expand Down
10 changes: 10 additions & 0 deletions .spellcheck.local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
matrix:
- name: Markdown
sources:
- ['!docs/doxygen/mainpage.md']
- name: reST
sources:
- []
- name: Cpp
sources:
- ['include/hip/*']
15 changes: 15 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@ APUs
AQL
AXPY
asm
Asynchronicity
Asynchrony
asynchrony
backtrace
Bitcode
bitcode
bitcodes
blockDim
blockIdx
builtins
Builtins
CAS
clr
compilable
constexpr
coroutines
Ctx
cuBLASLt
Expand Down Expand Up @@ -51,6 +56,7 @@ FNUZ
fp
gedit
GPGPU
gridDim
GROMACS
GWS
hardcoded
Expand All @@ -67,6 +73,7 @@ hipModule
hipModuleLaunchKernel
hipother
HIPRTC
hyperthreading
icc
IILE
iGPU
Expand Down Expand Up @@ -97,6 +104,7 @@ makefile
Malloc
malloc
MALU
maxregcount
MiB
memset
multicore
Expand All @@ -110,6 +118,7 @@ NDRange
nonnegative
NOP
Numa
ns
Nsight
ocp
omnitrace
Expand All @@ -118,13 +127,16 @@ overindexing
oversubscription
overutilized
parallelizable
pipelining
parallelized
pixelated
pragmas
preallocated
preconditioners
predefining
prefetched
preprocessor
printf
profilers
PTX
PyHIP
Expand Down Expand Up @@ -153,19 +165,22 @@ SYCL
syntaxes
texel
texels
threadIdx
tradeoffs
templated
toolkits
transfering
typedefs
unintuitive
UMM
uncoalesced
unmap
unmapped
unmapping
unregister
upscaled
variadic
vulkan
warpSize
WinGDB
zc
39 changes: 16 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Key features include:

New projects can be developed directly in the portable HIP C++ language and can run on either NVIDIA or AMD platforms. Additionally, HIP provides porting tools which make it easy to port existing CUDA codes to the HIP layer, with no loss of performance as compared to the original CUDA application. HIP is not intended to be a drop-in replacement for CUDA, and developers should expect to do some manual coding and performance tuning work to complete the port.

> [!NOTE]
> The published documentation is available at [HIP documentation](https://rocm.docs.amd.com/projects/HIP/en/latest/index.html) in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in the `HIP/docs` folder of this GitHub repository. As with all ROCm projects, the documentation is open source. For more information on contributing to the documentation, see [Contribute to ROCm documentation](https://rocm.docs.amd.com/en/latest/contribute/contributing.html).

## DISCLAIMER

The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions, and typographical errors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard versionchanges, new model and/or product releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. Any computer system has risks of security vulnerabilities that cannot be completely prevented or mitigated.AMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reserves the right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person of such revisions or changes.THIS INFORMATION IS PROVIDED ‘AS IS.” AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS, OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY RELIANCE, DIRECT, INDIRECT, SPECIAL, OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. AMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.
Expand Down Expand Up @@ -39,24 +42,24 @@ HIP releases are typically naming convention for each ROCM release to help diffe
* [HIP FAQ](docs/faq.rst)
* [HIP C++ Language Extensions](docs/reference/cpp_language_extensions.rst)
* [HIP Porting Guide](docs/how-to/hip_porting_guide.md)
* [HIP Porting Driver Guide](docs/how-to/hip_porting_driver_api.md)
* [HIP Programming Guide](docs/how-to/programming_manual.md)
* [HIP Porting Driver Guide](docs/how-to/hip_porting_driver_api.rst)
* [HIP Programming Guide](docs/programming_guide.rst)
* [HIP Logging](docs/how-to/logging.rst)
* [Building HIP From Source](docs/install/build.rst)
* [HIP Debugging](docs/how-to/debugging.rst)
* [HIP RTC](docs/how-to/hip_rtc.md)
* [HIP Terminology](docs/reference/terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/OpenCL)
* [HIPIFY](https://github.com/ROCm/HIPIFY/blob/amd-staging/README.md)
* Supported CUDA APIs:
* [Runtime API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUDA_Runtime_API_functions_supported_by_HIP.md)
* [Driver API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUDA_Driver_API_functions_supported_by_HIP.md)
* [cuComplex API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/cuComplex_API_supported_by_HIP.md)
* [Device API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUDA_Device_API_supported_by_HIP.md)
* [cuBLAS](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUBLAS_API_supported_by_ROC.md)
* [cuRAND](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CURAND_API_supported_by_HIP.md)
* [cuDNN](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUDNN_API_supported_by_HIP.md)
* [cuFFT](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUFFT_API_supported_by_HIP.md)
* [cuSPARSE](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/tables/CUSPARSE_API_supported_by_HIP.md)
* [Runtime API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUDA_Runtime_API_functions_supported_by_HIP.md)
* [Driver API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUDA_Driver_API_functions_supported_by_HIP.md)
* [cuComplex API](https://github.com/ROCm/HIPIFY/blob/amd-staging/reference/docs/tables/cuComplex_API_supported_by_HIP.md)
* [Device API](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUDA_Device_API_supported_by_HIP.md)
* [cuBLAS](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUBLAS_API_supported_by_ROC.md)
* [cuRAND](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CURAND_API_supported_by_HIP.md)
* [cuDNN](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUDNN_API_supported_by_HIP.md)
* [cuFFT](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUFFT_API_supported_by_HIP.md)
* [cuSPARSE](https://github.com/ROCm/HIPIFY/blob/amd-staging/docs/reference/tables/CUSPARSE_API_supported_by_HIP.md)
* [Developer/CONTRIBUTING Info](CONTRIBUTING.md)
* [Release Notes](RELEASE.md)

Expand Down Expand Up @@ -124,19 +127,9 @@ provides source portability to either platform. HIP provides the _hipcc_ compi

## Examples and Getting Started

* A sample and [blog](https://github.com/ROCm/hip-tests/tree/develop/samples/0_Intro/square) that uses any of [HIPIFY](https://github.com/ROCm/HIPIFY/blob/amd-staging/README.md) tools to convert a simple app from CUDA to HIP:

```shell
cd samples/01_Intro/square
# follow README / blog steps to hipify the application.
```

* Guide to [Porting a New Cuda Project](https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_porting_guide.html#porting-a-new-cuda-project)

## More Examples
* The [ROCm-examples](https://github.com/ROCm/rocm-examples) repository includes many examples with explanations that help users getting started with HIP, as well as providing advanced examples for HIP and its libraries.

The GitHub repository [HIP-Examples](https://github.com/ROCm/HIP-Examples) contains a hipified version of benchmark suite.
Besides, there are more samples in Github [HIP samples](https://github.com/ROCm/hip-tests/tree/develop/samples), showing how to program with different features, build and run.
* HIP's documentation includes a guide for [Porting a New Cuda Project](https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_porting_guide.html#porting-a-new-cuda-project).

## Tour of the HIP Directories

Expand Down
Loading