Language Runtime README Changes (#650)
- Renaming old `README.md` files to keep their information intact. - Default `README.md` files will have the deprecation notice to be mirrored back into the individual repos. - Change ROCR-Runtime mirroring to `develop` branch.
This commit is contained in:
committad av
GitHub
förälder
ed53090c25
incheckning
f5ac5efd79
@@ -115,7 +115,7 @@
|
||||
{
|
||||
"name": "rocr-runtime",
|
||||
"url": "ROCm/ROCR-Runtime",
|
||||
"branch": "amd-staging",
|
||||
"branch": "develop",
|
||||
"category": "projects",
|
||||
"auto_subtree_pull": false,
|
||||
"auto_subtree_push": true
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# AMD CLR - Compute Language Runtimes
|
||||
|
||||
AMD CLR (Compute Language Runtime) contains source codes for AMD's compute languages runtimes: `HIP` and `OpenCL™`.
|
||||
|
||||
## Project Organisation
|
||||
|
||||
- `hipamd` - contains implementation of `HIP` language on AMD platform. It is hosted at [ROCm/clr/hipamd](https://github.com/ROCm/clr/tree/develop/hipamd)
|
||||
- `opencl` - contains implementation of [OpenCL™](https://www.khronos.org/opencl/) on AMD platform. Now it is hosted at [ROCm/clr/opencl](https://github.com/ROCm/clr/tree/develop/opencl)
|
||||
- `rocclr` - contains compute runtime used in `HIP` and `OpenCL™`. This is hosted at [ROCm/clr/rocclr](https://github.com/ROCm/clr/tree/develop/rocclr)
|
||||
|
||||
## How to build/install
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Please refer to Quick Start Guide in [ROCm Docs](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html).
|
||||
|
||||
Building clr requires `rocm-hip-libraries` meta package, which provides the pre-requisites for clr.
|
||||
If you need to build static clr library, `rocm-llvm-dev` package should be installed which has support for compilation of the static library.
|
||||
|
||||
### Linux
|
||||
|
||||
- Clone this repository
|
||||
|
||||
- `cd clr && mkdir build && cd build`
|
||||
|
||||
- For HIP:
|
||||
|
||||
- `cmake .. -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR -DHIPCC_BIN_DIR=$HIPCC_BIN_DIR`
|
||||
|
||||
- `HIP_COMMON_DIR` points to [HIP](https://github.com/ROCm/HIP)
|
||||
|
||||
- `HIPCC_BIN_DIR` points to hipcc directory, if you have ROCm installed you can point it to `$ROCM_PATH/bin`
|
||||
|
||||
- For OpenCL™:
|
||||
|
||||
- `cmake .. -DCLR_BUILD_OCL=ON`
|
||||
|
||||
- Build and install
|
||||
|
||||
```
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
Users can also build `OCL` and `HIP` at the same time by passing `-DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=ON` to configure command.
|
||||
|
||||
HIP/CLR can be built as a static library, users need to add more options in `cmake` command,
|
||||
`-DBUILD_SHARED_LIBS=OFF` and `-DCMAKE_PREFIX_PATH="/opt/rocm/;/opt/rocm/llvm`.
|
||||
|
||||
For detail instructions, please refer to [how to build HIP](https://rocm.docs.amd.com/projects/HIP/en/latest/install/build.html)
|
||||
|
||||
## Tests
|
||||
|
||||
`hip-tests` is a separate repository hosted at [hip-tests](https://github.com/ROCm/hip-tests).
|
||||
|
||||
To run `hip-tests` please go to the repository and follow the steps.
|
||||
|
||||
## Release notes
|
||||
|
||||
HIP provides release notes in [CLR change log](./CHANGELOG.md), which has the records of changes in each release.
|
||||
|
||||
## 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.
|
||||
|
||||
© 2023 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
OpenCL™ is registered Trademark of Apple
|
||||
+3
-65
@@ -1,68 +1,6 @@
|
||||
# AMD CLR - Compute Language Runtimes
|
||||
|
||||
> [!CAUTION]
|
||||
> The clr repository is retired, please use the [ROCm/rocm-systems](https://github.com/ROCm/rocm-systems/tree/develop/projects/clr) repository for development. This `develop` branch will only accept patch updates from a bot that mirrors clr-specific updates from `rocm-systems` into here.
|
||||
|
||||
AMD CLR (Compute Language Runtime) contains source codes for AMD's compute languages runtimes: `HIP` and `OpenCL™`.
|
||||
|
||||
## Project Organisation
|
||||
|
||||
- `hipamd` - contains implementation of `HIP` language on AMD platform. It is hosted at [ROCm/clr/hipamd](https://github.com/ROCm/clr/tree/develop/hipamd)
|
||||
- `opencl` - contains implementation of [OpenCL™](https://www.khronos.org/opencl/) on AMD platform. Now it is hosted at [ROCm/clr/opencl](https://github.com/ROCm/clr/tree/develop/opencl)
|
||||
- `rocclr` - contains compute runtime used in `HIP` and `OpenCL™`. This is hosted at [ROCm/clr/rocclr](https://github.com/ROCm/clr/tree/develop/rocclr)
|
||||
|
||||
## How to build/install
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Please refer to Quick Start Guide in [ROCm Docs](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html).
|
||||
|
||||
Building clr requires `rocm-hip-libraries` meta package, which provides the pre-requisites for clr.
|
||||
If you need to build static clr library, `rocm-llvm-dev` package should be installed which has support for compilation of the static library.
|
||||
|
||||
### Linux
|
||||
|
||||
- Clone this repository
|
||||
|
||||
- `cd clr && mkdir build && cd build`
|
||||
|
||||
- For HIP:
|
||||
|
||||
- `cmake .. -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR -DHIPCC_BIN_DIR=$HIPCC_BIN_DIR`
|
||||
|
||||
- `HIP_COMMON_DIR` points to [HIP](https://github.com/ROCm/HIP)
|
||||
|
||||
- `HIPCC_BIN_DIR` points to hipcc directory, if you have ROCm installed you can point it to `$ROCM_PATH/bin`
|
||||
|
||||
- For OpenCL™:
|
||||
|
||||
- `cmake .. -DCLR_BUILD_OCL=ON`
|
||||
|
||||
- Build and install
|
||||
|
||||
```
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
Users can also build `OCL` and `HIP` at the same time by passing `-DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=ON` to configure command.
|
||||
|
||||
HIP/CLR can be built as a static library, users need to add more options in `cmake` command,
|
||||
`-DBUILD_SHARED_LIBS=OFF` and `-DCMAKE_PREFIX_PATH="/opt/rocm/;/opt/rocm/llvm`.
|
||||
|
||||
For detail instructions, please refer to [how to build HIP](https://rocm.docs.amd.com/projects/HIP/en/latest/install/build.html)
|
||||
|
||||
## Tests
|
||||
|
||||
`hip-tests` is a separate repository hosted at [hip-tests](https://github.com/ROCm/hip-tests).
|
||||
|
||||
To run `hip-tests` please go to the repository and follow the steps.
|
||||
|
||||
## Release notes
|
||||
|
||||
HIP provides release notes in [CLR change log](./CHANGELOG.md), which has the records of changes in each release.
|
||||
|
||||
## 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.
|
||||
|
||||
© 2023 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
OpenCL™ is registered Trademark of Apple
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
## What is this repository for? ###
|
||||
|
||||
This repository provides unit tests for [HIP](https://github.com/ROCm/HIP) implementation.
|
||||
|
||||
## 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.
|
||||
|
||||
©2025 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
## Repository branches
|
||||
|
||||
The hip-tests repository maintains several branches. The branches that are of importance are:
|
||||
|
||||
* Main branch: This is the stable branch. It is up to date with the latest release branch, for example, if the latest release is rocm-5.4, main branch will be the repository based on this release.
|
||||
* Develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
|
||||
* Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-5.4, etc.
|
||||
|
||||
## Release tagging
|
||||
|
||||
hip-tests releases are typically naming convention for each ROCM release to help differentiate them.
|
||||
|
||||
* rocm x.yy: These are the stable releases based on the ROCM release.
|
||||
This type of release is typically made once a month.
|
||||
|
||||
## Build HIP Catch tests
|
||||
|
||||
For building HIP from source, please check instructions on the [HIP page](https://rocm.docs.amd.com/projects/HIP/en/latest/install/build.html).
|
||||
|
||||
HIP catch tests can be built via the following instructions:
|
||||
|
||||
1 .Clone the hip-tests source code from the repository, with definition of branch. The default branch is `develop`, as an example,
|
||||
```bash
|
||||
$ git clone -b develop https://github.com/ROCm/hip-tests.git
|
||||
$ export HIP_TESTS_DIR="$(readlink -f hip-tests)"
|
||||
```
|
||||
|
||||
2. Build the catch tests
|
||||
```bash
|
||||
$ cd "$HIP_TESTS_DIR"
|
||||
$ mkdir -p build; cd build
|
||||
$ cmake ../catch/ -DHIP_PLATFORM=amd
|
||||
$ make -j$(nproc) build_tests
|
||||
$ ctest # run tests
|
||||
```
|
||||
|
||||
HIP catch tests are built under the folder `$HIP_TESTS_DIR/build`.
|
||||
|
||||
### Build HIP Catch2 standalone test
|
||||
|
||||
HIP Catch2 supports building standalone tests, for example,
|
||||
|
||||
```bash
|
||||
$ hipcc $HIP_TESTS_DIR/catch/unit/memory/hipPointerGetAttributes.cc -I ./catch/include ./catch/hipTestMain/standalone_main.cc -I ./catch/external/Catch2 -o hipPointerGetAttributes
|
||||
$ ./hipPointerGetAttributes
|
||||
```
|
||||
|
||||
### Building with address sanitizer
|
||||
|
||||
To build catch tests with Address Sanitizer options, use the cmake option `-DENABLE_ADDRESS_SANITIZER=ON`.
|
||||
@@ -1,60 +1,6 @@
|
||||
## What is this repository for? ###
|
||||
# hip-tests
|
||||
|
||||
This repository provides unit tests for [HIP](https://github.com/ROCm/HIP) implementation.
|
||||
> [!CAUTION]
|
||||
> The hip-tests repository is retired, please use the [ROCm/rocm-systems](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip-tests) repository for development. This `develop` branch will only accept patch updates from a bot that mirrors hip-tests-specific updates from `rocm-systems` into here.
|
||||
|
||||
## 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.
|
||||
|
||||
©2025 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
## Repository branches
|
||||
|
||||
The hip-tests repository maintains several branches. The branches that are of importance are:
|
||||
|
||||
* Main branch: This is the stable branch. It is up to date with the latest release branch, for example, if the latest release is rocm-5.4, main branch will be the repository based on this release.
|
||||
* Develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
|
||||
* Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-5.4, etc.
|
||||
|
||||
## Release tagging
|
||||
|
||||
hip-tests releases are typically naming convention for each ROCM release to help differentiate them.
|
||||
|
||||
* rocm x.yy: These are the stable releases based on the ROCM release.
|
||||
This type of release is typically made once a month.
|
||||
|
||||
## Build HIP Catch tests
|
||||
|
||||
For building HIP from source, please check instructions on the [HIP page](https://rocm.docs.amd.com/projects/HIP/en/latest/install/build.html).
|
||||
|
||||
HIP catch tests can be built via the following instructions:
|
||||
|
||||
1 .Clone the hip-tests source code from the repository, with definition of branch. The default branch is `develop`, as an example,
|
||||
```bash
|
||||
$ git clone -b develop https://github.com/ROCm/hip-tests.git
|
||||
$ export HIP_TESTS_DIR="$(readlink -f hip-tests)"
|
||||
```
|
||||
|
||||
2. Build the catch tests
|
||||
```bash
|
||||
$ cd "$HIP_TESTS_DIR"
|
||||
$ mkdir -p build; cd build
|
||||
$ cmake ../catch/ -DHIP_PLATFORM=amd
|
||||
$ make -j$(nproc) build_tests
|
||||
$ ctest # run tests
|
||||
```
|
||||
|
||||
HIP catch tests are built under the folder `$HIP_TESTS_DIR/build`.
|
||||
|
||||
### Build HIP Catch2 standalone test
|
||||
|
||||
HIP Catch2 supports building standalone tests, for example,
|
||||
|
||||
```bash
|
||||
$ hipcc $HIP_TESTS_DIR/catch/unit/memory/hipPointerGetAttributes.cc -I ./catch/include ./catch/hipTestMain/standalone_main.cc -I ./catch/external/Catch2 -o hipPointerGetAttributes
|
||||
$ ./hipPointerGetAttributes
|
||||
```
|
||||
|
||||
### Building with address sanitizer
|
||||
|
||||
To build catch tests with Address Sanitizer options, use the cmake option `-DENABLE_ADDRESS_SANITIZER=ON`.
|
||||
This repository provides unit tests for [HIP](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip) implementation.
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
## What is this repository for?
|
||||
|
||||
**HIP is a C++ Runtime API and Kernel Language that allows developers to create portable applications for AMD and NVIDIA GPUs from single source code.**
|
||||
|
||||
Key features include:
|
||||
|
||||
* HIP is very thin and has little or no performance impact over coding directly in CUDA mode.
|
||||
* HIP allows coding in a single-source C++ programming language including features such as templates, C++11 lambdas, classes, namespaces, and more.
|
||||
* HIP allows developers to use the "best" development environment and tools on each target platform.
|
||||
* The [HIPIFY](https://github.com/ROCm/HIPIFY/blob/amd-staging/README.md) tools automatically convert source from CUDA to HIP.
|
||||
* Developers can specialize for the platform (CUDA or AMD) to tune for performance or handle tricky cases.
|
||||
|
||||
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.
|
||||
|
||||
© 2023 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
## Repository branches
|
||||
|
||||
The HIP repository maintains several branches. The branches that are of importance are:
|
||||
|
||||
* develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
|
||||
* Main branch: This is the stable branch. It is up to date with the latest release branch, for example, if the latest HIP release is rocm-4.3, main branch will be the repository based on this release.
|
||||
* Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-4.2, rocm-4.3, etc.
|
||||
|
||||
## Release tagging
|
||||
|
||||
HIP releases are typically naming convention for each ROCM release to help differentiate them.
|
||||
|
||||
* rocm x.yy: These are the stable releases based on the ROCM release.
|
||||
This type of release is typically made once a month.*
|
||||
|
||||
## How do I get set up?
|
||||
|
||||
See the [Installation](docs/install/install.rst) notes.
|
||||
|
||||
## Simple Example
|
||||
|
||||
The HIP API includes functions such as hipMalloc, hipMemcpy, and hipFree.
|
||||
Programmers familiar with CUDA will also be able to quickly learn and start coding with the HIP API.
|
||||
Compute kernels are launched with the "hipLaunchKernelGGL" macro call.
|
||||
Here is simple example showing a snippet of HIP API code:
|
||||
|
||||
```cpp
|
||||
hipMalloc(&A_d, Nbytes);
|
||||
hipMalloc(&C_d, Nbytes);
|
||||
|
||||
hipMemcpy(A_d, A_h, Nbytes, hipMemcpyHostToDevice);
|
||||
|
||||
const unsigned blocks = 512;
|
||||
const unsigned threadsPerBlock = 256;
|
||||
hipLaunchKernelGGL(vector_square, /* compute kernel*/
|
||||
dim3(blocks), dim3(threadsPerBlock), 0/*dynamic shared*/, 0/*stream*/, /* launch config*/
|
||||
C_d, A_d, N); /* arguments to the compute kernel */
|
||||
|
||||
hipMemcpy(C_h, C_d, Nbytes, hipMemcpyDeviceToHost);
|
||||
```
|
||||
|
||||
The HIP kernel language defines builtins for determining grid and block coordinates, math functions, short vectors,
|
||||
atomics, and timer functions.
|
||||
It also specifies additional defines and keywords for function types, address spaces, and optimization controls (See the [HIP C++ Language Extensions](docs/how-to/hip_cpp_language_extensions.rst) for a full description).
|
||||
Here's an example of defining a simple 'vector_square' kernel.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
__global__ void
|
||||
vector_square(T *C_d, const T *A_d, size_t N)
|
||||
{
|
||||
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
|
||||
size_t stride = blockDim.x * gridDim.x;
|
||||
|
||||
for (size_t i=offset; i<N; i+=stride) {
|
||||
C_d[i] = A_d[i] * A_d[i];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The HIP Runtime API code and compute kernel definition can exist in the same source file - HIP takes care of generating host and device code appropriately.
|
||||
|
||||
## HIP Portability and Compiler Technology
|
||||
|
||||
HIP C++ code can be compiled with either,
|
||||
|
||||
* On the NVIDIA CUDA platform, HIP provides header file in the repository [hipother](https://github.com/ROCm/hipother) which translate from the HIP runtime APIs to CUDA runtime APIs. The header file contains mostly inlined
|
||||
functions and thus has very low overhead - developers coding in HIP should expect the same performance as coding in native CUDA. The code is then
|
||||
compiled with nvcc, the standard C++ compiler provided with the CUDA SDK. Developers can use any tools supported by the CUDA SDK including the CUDA
|
||||
profiler and debugger.
|
||||
* On the AMD ROCm platform, HIP provides a header and runtime library built on top of HIP-Clang compiler in the repository [Compute Language Runtime (CLR)](https://github.com/ROCm/clr). The HIP runtime implements HIP streams, events, and memory APIs,
|
||||
and is a object library that is linked with the application. The source code for all headers and the library implementation is available on GitHub.
|
||||
HIP developers on ROCm can use AMD's [ROCgdb](https://github.com/ROCm/ROCgdb) for debugging and profiling.
|
||||
|
||||
Thus HIP source code can be compiled to run on either platform. Platform-specific features can be isolated to a specific platform using conditional compilation. Thus HIP
|
||||
provides source portability to either platform. HIP provides the _hipcc_ compiler driver which will call the appropriate toolchain depending on the desired platform.
|
||||
|
||||
## Examples and Getting Started
|
||||
|
||||
* 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.
|
||||
|
||||
* 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
|
||||
|
||||
* **include**:
|
||||
* **hip_runtime_api.h** : Defines HIP runtime APIs and can be compiled with many standard Linux compilers (GCC, ICC, CLANG, etc), in either C or C++ mode.
|
||||
* **hip_runtime.h** : Includes everything in hip_runtime_api.h PLUS hipLaunchKernelGGL and syntax for writing device kernels and device functions. hip_runtime.h can be compiled using a standard C++ compiler but will expose a subset of the available functions.
|
||||
* **amd_detail/**** , **nvidia_detail/**** : Implementation details for specific platforms. HIP applications should not include these files directly.
|
||||
|
||||
* **bin**: Tools and scripts to help with hip porting
|
||||
* **hipcc** : Compiler driver that can be used to replace nvcc in existing CUDA code. hipcc will call nvcc or HIP-Clang depending on platform and include appropriate platform-specific headers and libraries.
|
||||
* **hipconfig** : Print HIP configuration (HIP_PATH, HIP_PLATFORM, HIP_COMPILER, HIP_RUNTIME, CXX config flags, etc.)
|
||||
|
||||
* **docs**: Documentation - markdown and doxygen info.
|
||||
|
||||
## Reporting an issue
|
||||
|
||||
Use the [GitHub issue tracker](https://github.com/ROCm/HIP/issues).
|
||||
If reporting a bug, include the output of "hipconfig --full" and samples/1_hipInfo/hipInfo (if possible).
|
||||
+4
-121
@@ -1,123 +1,6 @@
|
||||
## What is this repository for?
|
||||
# HIP
|
||||
|
||||
> [!CAUTION]
|
||||
> The hip repository is retired, please use the [ROCm/rocm-systems](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip) repository for development. This `develop` branch will only accept patch updates from a bot that mirrors hip-specific updates from `rocm-systems` into here.
|
||||
|
||||
**HIP is a C++ Runtime API and Kernel Language that allows developers to create portable applications for AMD and NVIDIA GPUs from single source code.**
|
||||
|
||||
Key features include:
|
||||
|
||||
* HIP is very thin and has little or no performance impact over coding directly in CUDA mode.
|
||||
* HIP allows coding in a single-source C++ programming language including features such as templates, C++11 lambdas, classes, namespaces, and more.
|
||||
* HIP allows developers to use the "best" development environment and tools on each target platform.
|
||||
* The [HIPIFY](https://github.com/ROCm/HIPIFY/blob/amd-staging/README.md) tools automatically convert source from CUDA to HIP.
|
||||
* Developers can specialize for the platform (CUDA or AMD) to tune for performance or handle tricky cases.
|
||||
|
||||
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.
|
||||
|
||||
© 2023 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
## Repository branches
|
||||
|
||||
The HIP repository maintains several branches. The branches that are of importance are:
|
||||
|
||||
* develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
|
||||
* Main branch: This is the stable branch. It is up to date with the latest release branch, for example, if the latest HIP release is rocm-4.3, main branch will be the repository based on this release.
|
||||
* Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-4.2, rocm-4.3, etc.
|
||||
|
||||
## Release tagging
|
||||
|
||||
HIP releases are typically naming convention for each ROCM release to help differentiate them.
|
||||
|
||||
* rocm x.yy: These are the stable releases based on the ROCM release.
|
||||
This type of release is typically made once a month.*
|
||||
|
||||
## How do I get set up?
|
||||
|
||||
See the [Installation](docs/install/install.rst) notes.
|
||||
|
||||
## Simple Example
|
||||
|
||||
The HIP API includes functions such as hipMalloc, hipMemcpy, and hipFree.
|
||||
Programmers familiar with CUDA will also be able to quickly learn and start coding with the HIP API.
|
||||
Compute kernels are launched with the "hipLaunchKernelGGL" macro call.
|
||||
Here is simple example showing a snippet of HIP API code:
|
||||
|
||||
```cpp
|
||||
hipMalloc(&A_d, Nbytes);
|
||||
hipMalloc(&C_d, Nbytes);
|
||||
|
||||
hipMemcpy(A_d, A_h, Nbytes, hipMemcpyHostToDevice);
|
||||
|
||||
const unsigned blocks = 512;
|
||||
const unsigned threadsPerBlock = 256;
|
||||
hipLaunchKernelGGL(vector_square, /* compute kernel*/
|
||||
dim3(blocks), dim3(threadsPerBlock), 0/*dynamic shared*/, 0/*stream*/, /* launch config*/
|
||||
C_d, A_d, N); /* arguments to the compute kernel */
|
||||
|
||||
hipMemcpy(C_h, C_d, Nbytes, hipMemcpyDeviceToHost);
|
||||
```
|
||||
|
||||
The HIP kernel language defines builtins for determining grid and block coordinates, math functions, short vectors,
|
||||
atomics, and timer functions.
|
||||
It also specifies additional defines and keywords for function types, address spaces, and optimization controls (See the [HIP C++ Language Extensions](docs/how-to/hip_cpp_language_extensions.rst) for a full description).
|
||||
Here's an example of defining a simple 'vector_square' kernel.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
__global__ void
|
||||
vector_square(T *C_d, const T *A_d, size_t N)
|
||||
{
|
||||
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
|
||||
size_t stride = blockDim.x * gridDim.x;
|
||||
|
||||
for (size_t i=offset; i<N; i+=stride) {
|
||||
C_d[i] = A_d[i] * A_d[i];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The HIP Runtime API code and compute kernel definition can exist in the same source file - HIP takes care of generating host and device code appropriately.
|
||||
|
||||
## HIP Portability and Compiler Technology
|
||||
|
||||
HIP C++ code can be compiled with either,
|
||||
|
||||
* On the NVIDIA CUDA platform, HIP provides header file in the repository [hipother](https://github.com/ROCm/hipother) which translate from the HIP runtime APIs to CUDA runtime APIs. The header file contains mostly inlined
|
||||
functions and thus has very low overhead - developers coding in HIP should expect the same performance as coding in native CUDA. The code is then
|
||||
compiled with nvcc, the standard C++ compiler provided with the CUDA SDK. Developers can use any tools supported by the CUDA SDK including the CUDA
|
||||
profiler and debugger.
|
||||
* On the AMD ROCm platform, HIP provides a header and runtime library built on top of HIP-Clang compiler in the repository [Compute Language Runtime (CLR)](https://github.com/ROCm/clr). The HIP runtime implements HIP streams, events, and memory APIs,
|
||||
and is a object library that is linked with the application. The source code for all headers and the library implementation is available on GitHub.
|
||||
HIP developers on ROCm can use AMD's [ROCgdb](https://github.com/ROCm/ROCgdb) for debugging and profiling.
|
||||
|
||||
Thus HIP source code can be compiled to run on either platform. Platform-specific features can be isolated to a specific platform using conditional compilation. Thus HIP
|
||||
provides source portability to either platform. HIP provides the _hipcc_ compiler driver which will call the appropriate toolchain depending on the desired platform.
|
||||
|
||||
## Examples and Getting Started
|
||||
|
||||
* 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.
|
||||
|
||||
* 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
|
||||
|
||||
* **include**:
|
||||
* **hip_runtime_api.h** : Defines HIP runtime APIs and can be compiled with many standard Linux compilers (GCC, ICC, CLANG, etc), in either C or C++ mode.
|
||||
* **hip_runtime.h** : Includes everything in hip_runtime_api.h PLUS hipLaunchKernelGGL and syntax for writing device kernels and device functions. hip_runtime.h can be compiled using a standard C++ compiler but will expose a subset of the available functions.
|
||||
* **amd_detail/**** , **nvidia_detail/**** : Implementation details for specific platforms. HIP applications should not include these files directly.
|
||||
|
||||
* **bin**: Tools and scripts to help with hip porting
|
||||
* **hipcc** : Compiler driver that can be used to replace nvcc in existing CUDA code. hipcc will call nvcc or HIP-Clang depending on platform and include appropriate platform-specific headers and libraries.
|
||||
* **hipconfig** : Print HIP configuration (HIP_PATH, HIP_PLATFORM, HIP_COMPILER, HIP_RUNTIME, CXX config flags, etc.)
|
||||
|
||||
* **docs**: Documentation - markdown and doxygen info.
|
||||
|
||||
## Reporting an issue
|
||||
|
||||
Use the [GitHub issue tracker](https://github.com/ROCm/HIP/issues).
|
||||
If reporting a bug, include the output of "hipconfig --full" and samples/1_hipInfo/hipInfo (if possible).
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
## What is this repository for? ###
|
||||
|
||||
This repository provides files required to support non-AMD specific back-end implementation for [HIP](https://github.com/ROCm/HIP).
|
||||
|
||||
## 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.
|
||||
|
||||
©2023 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
## Repository branches:
|
||||
|
||||
The hipother repository maintains several branches. The branches that are of importance are:
|
||||
|
||||
* Develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
|
||||
* Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-6.0, etc.
|
||||
|
||||
## Release tagging:
|
||||
|
||||
hipother releases are typically naming convention for each ROCM release to help differentiate them.
|
||||
|
||||
* rocm x.yy: These are the stable releases based on the ROCM release.
|
||||
@@ -1,22 +1,6 @@
|
||||
## What is this repository for? ###
|
||||
# hipother
|
||||
|
||||
This repository provides files required to support non-AMD specific back-end implementation for [HIP](https://github.com/ROCm/HIP).
|
||||
> [!CAUTION]
|
||||
> The hipother repository is retired, please use the [ROCm/rocm-systems](https://github.com/ROCm/rocm-systems/tree/develop/projects/hipother) repository for development. This `develop` branch will only accept patch updates from a bot that mirrors hipother-specific updates from `rocm-systems` into here.
|
||||
|
||||
## 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.
|
||||
|
||||
©2023 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||
|
||||
## Repository branches:
|
||||
|
||||
The hipother repository maintains several branches. The branches that are of importance are:
|
||||
|
||||
* Develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
|
||||
* Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-6.0, etc.
|
||||
|
||||
## Release tagging:
|
||||
|
||||
hipother releases are typically naming convention for each ROCM release to help differentiate them.
|
||||
|
||||
* rocm x.yy: These are the stable releases based on the ROCM release.
|
||||
This repository provides files required to support non-AMD specific back-end implementation for [HIP](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip).
|
||||
|
||||
Referens i nytt ärende
Block a user