From d21183c1940c3d179e3e7ae734fc6d6d95deacb0 Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Sat, 17 Jun 2023 03:28:53 +0530 Subject: [PATCH 1/2] SWDEV-405375 - Fix dead links in HIP documentations (#3258) Change-Id: Ia0f4990fa897271fd8c83ce1b073f3d1a761ffa0 --- README.md | 47 +++++++++++++++++------------------ docs/how_to_guides/install.md | 6 ++--- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 575fdd061a..04189246f2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ New projects can be developed directly in the portable HIP C++ language and can 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. -© 2021 Advanced Micro Devices, Inc. All Rights Reserved. +© 2023 Advanced Micro Devices, Inc. All Rights Reserved. ## Repository branches: @@ -34,19 +34,18 @@ HIP releases are typically naming convention for each ROCM release to help diffe This type of release is typically made once a month.* ## More Info: -- [Installation](INSTALL.md) -- [HIP FAQ](docs/markdown/hip_faq.md) -- [HIP Kernel Language](docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](https://github.com/RadeonOpenCompute/ROCm) -- [HIP Porting Guide](docs/markdown/hip_porting_guide.md) -- [HIP Porting Driver Guide](docs/markdown/hip_porting_driver_api.md) -- [HIP Programming Guide](docs/markdown/hip_programming_guide.md) -- [HIP Logging ](docs/markdown/hip_logging.md) -- [HIP Debugging ](docs/markdown/hip_debugging.md) -- [Code Object tooling ](docs/markdown/obj_tooling.md) -- [HIP RTC](docs/markdown/hip_rtc.md) -- [HIP Terminology](docs/markdown/hip_terms2.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/OpenCL) -- [HIPIFY](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/README.md) +- [Installation](docs/how_to_guides/install.md) +- [HIP FAQ](docs/user_guide/faq.md) +- [HIP Kernel Language](docs/reference/kernel_language.md) +- [HIP Porting Guide](docs/user_guide/hip_porting_guide.md) +- [HIP Porting Driver Guide](docs/user_guide/hip_porting_driver_api.md) +- [HIP Programming Guide](docs/user_guide/programming_manual.md) +- [HIP Logging ](docs/developer_guide/logging.md) +- [Building HIP From Source](docs/developer_guide/build.md) +- [HIP Debugging ](docs/how_to_guides/debugging.md) +- [HIP RTC](docs/user_guide/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-Developer-Tools/HIPIFY/blob/amd-staging/README.md) - Supported CUDA APIs: * [Runtime API](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/doc/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md) * [Driver API](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/doc/markdown/CUDA_Driver_API_functions_supported_by_HIP.md) @@ -57,18 +56,18 @@ HIP releases are typically naming convention for each ROCM release to help diffe * [cuDNN](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/doc/markdown/CUDNN_API_supported_by_HIP.md) * [cuFFT](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/doc/markdown/CUFFT_API_supported_by_HIP.md) * [cuSPARSE](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/doc/markdown/CUSPARSE_API_supported_by_HIP.md) -- [Developer/CONTRIBUTING Info](CONTRIBUTING.md) +- [Developer/CONTRIBUTING Info](docs/developer_guide/contributing.md) - [Release Notes](RELEASE.md) ## How do I get set up? -See the [Installation](INSTALL.md) notes. +See the [Installation](docs/how_to_guides/install.md) 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: +Compute kernels are launched with the "hipLaunchKernelGGL" macro call. +Here is simple example showing a snippet of HIP API code: ``` hipMalloc(&A_d, Nbytes); @@ -88,7 +87,7 @@ 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 Kernel Language](docs/markdown/hip_kernel_language.md) for a full description). +It also specifies additional defines and keywords for function types, address spaces, and optimization controls (See the [HIP Kernel Language](docs/reference/kernel_language.md) for a full description). Here's an example of defining a simple 'vector_square' kernel. @@ -124,7 +123,7 @@ provides source portability to either platform. HIP provides the _hipcc_ compi ## Examples and Getting Started: -* A sample and [blog](https://github.com/ROCm-Developer-Tools/HIP/tree/main/samples/0_Intro/square) that uses any of [HIPIFY](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/README.md) tools to convert a simple app from CUDA to HIP: +* A sample and [blog](https://github.com/ROCm-Developer-Tools/hip-tests/tree/develop/samples/0_Intro/square) that uses any of [HIPIFY](https://github.com/ROCm-Developer-Tools/HIPIFY/blob/amd-staging/README.md) tools to convert a simple app from CUDA to HIP: ```shell @@ -132,12 +131,12 @@ cd samples/01_Intro/square # follow README / blog steps to hipify the application. ``` -* Guide to [Porting a New Cuda Project](docs/markdown/hip_porting_guide.md#porting-a-new-cuda-project") +* Guide to [Porting a New Cuda Project](docs/user_guide/hip_porting_guide.md/"Porting a New CUDA Project") ## More Examples -The GitHub repository [HIP-Examples](https://github.com/ROCm-Developer-Tools/HIP-Examples.git) contains a hipified version of the popular Rodinia benchmark suite. -The README with the procedures and tips the team used during this porting effort is here: [Rodinia Porting Guide](https://github.com/ROCm-Developer-Tools/HIP-Examples/blob/master/rodinia_3.0/hip/README.hip_porting) +The GitHub repository [HIP-Examples](https://github.com/ROCm-Developer-Tools/HIP-Examples) contains a hipified version of benchmark suite. +Besides, there are more samples in Github [HIP samples](https://github.com/ROCm-Developer-Tools/hip-tests/tree/develop/samples), showing how to program with different features, build and run. ## Tour of the HIP Directories * **include**: @@ -149,7 +148,7 @@ The README with the procedures and tips the team used during this porting effort * **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.) -* **doc**: Documentation - markdown and doxygen info. +* **docs**: Documentation - markdown and doxygen info. ## Reporting an issue Use the [GitHub issue tracker](https://github.com/ROCm-Developer-Tools/HIP/issues). diff --git a/docs/how_to_guides/install.md b/docs/how_to_guides/install.md index b8b38a0199..dc496c02a8 100644 --- a/docs/how_to_guides/install.md +++ b/docs/how_to_guides/install.md @@ -40,14 +40,14 @@ apt-get install hip-runtime-nvidia hip-dev # Verify your installation -Run hipconfig (instructions below assume default installation path) : -```shell +Run hipconfig (instructions below assume default installation path): +``` /opt/rocm/bin/hipconfig --full ``` # How to build HIP from source Developers can build HIP from source on either AMD or NVIDIA platforms, see -detailed instructions at {doc}`/developer_guide/build` +detailed instructions at [building HIP from source](../developer_guide/build.md). From e8437f6326e8bf7d4f9b1348334b1df4320aed93 Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Sat, 17 Jun 2023 03:31:38 +0530 Subject: [PATCH 2/2] SWDEV-406099 - fix zero-length gnu_printf format warning in linux PSDB logs (#3262) Change-Id: I71ca50a11a83e57d4b8d41c225a55e5138e55731 --- .../src/runtimeApi/cooperativeGrps/api_failure_tests.cpp | 8 ++++---- .../cooperativeGrps/grid_group_data_sharing.cpp | 4 ++-- .../cooperativeGrps/multi_gpu_api_failure_tests.cpp | 6 +++--- .../src/runtimeApi/cooperativeGrps/multi_gpu_streams.cpp | 8 ++++---- .../cooperativeGrps/multi_grid_group_all_gpus.cpp | 6 +++--- .../cooperativeGrps/simple_grid_group_barrier.cpp | 4 ++-- .../cooperativeGrps/simple_multi_grid_group_barrier.cpp | 4 ++-- tests/src/runtimeApi/memory/hipIpcMemAccessTest.cpp | 2 +- .../runtimeApi/memory/hipMallocManaged_MultiScenario.cpp | 2 +- tests/src/runtimeApi/memory/hipManagedKeyword.cpp | 2 +- tests/src/runtimeApi/module/hipFuncSetSharedMemConfig.cpp | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/src/runtimeApi/cooperativeGrps/api_failure_tests.cpp b/tests/src/runtimeApi/cooperativeGrps/api_failure_tests.cpp index 91f47359b5..14dfb7464e 100644 --- a/tests/src/runtimeApi/cooperativeGrps/api_failure_tests.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/api_failure_tests.cpp @@ -60,7 +60,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << "hip error: " << hipGetErrorString(errval); std::cerr << std::endl; std::cerr << " Location: " << file << ":" << line << std::endl; - failed(""); + failed("\n"); } if (last_err != errval) { std::cerr << "Error: the return value of a function was not the same "; @@ -70,7 +70,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << " (" << errval << ")" << std::endl; std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err); std::cerr << " (" << last_err << ")" << std::endl; - failed(""); + failed("\n"); } } #define hipCheckErr(errval) \ @@ -180,7 +180,7 @@ int main(int argc, char** argv) { std::cerr << "to work on the device." << std::endl; std::cerr << "This is incorrect, and could possibly lead users "; std::cerr << "to try to launch kernels that will fail." << std::endl; - //failed(""); + //failed("\n"); FailFlag = 1; break; } @@ -279,7 +279,7 @@ int main(int argc, char** argv) { for (int m = 0; m < 2; ++m) { HIPCHECK(hipFree(dev_array[m])); } - failed(""); + failed("\n"); } } passed(); diff --git a/tests/src/runtimeApi/cooperativeGrps/grid_group_data_sharing.cpp b/tests/src/runtimeApi/cooperativeGrps/grid_group_data_sharing.cpp index cdedb8bca6..2974852fde 100644 --- a/tests/src/runtimeApi/cooperativeGrps/grid_group_data_sharing.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/grid_group_data_sharing.cpp @@ -67,7 +67,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << " (" << errval << ")" << std::endl; std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err); std::cerr << " (" << last_err << ")" << std::endl; - failed(""); + failed("\n"); } } #define hipCheckErr(errval)\ @@ -298,6 +298,6 @@ int main(int argc, char** argv) { if (!flag) { passed(); } else { - failed(""); + failed("\n"); } } diff --git a/tests/src/runtimeApi/cooperativeGrps/multi_gpu_api_failure_tests.cpp b/tests/src/runtimeApi/cooperativeGrps/multi_gpu_api_failure_tests.cpp index 40d20a48de..c834a23cee 100644 --- a/tests/src/runtimeApi/cooperativeGrps/multi_gpu_api_failure_tests.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/multi_gpu_api_failure_tests.cpp @@ -54,7 +54,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << "hip error: " << hipGetErrorString(errval); std::cerr << std::endl; std::cerr << " Location: " << file << ":" << line << std::endl; - failed(""); + failed("\n"); } if (last_err != errval) { std::cerr << "Error: the return value of a function was not the same "; @@ -64,7 +64,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << " (" << errval << ")" << std::endl; std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err); std::cerr << " (" << last_err << ")" << std::endl; - failed(""); + failed("\n"); } } #define hipCheckErr(errval) \ @@ -580,7 +580,7 @@ int main(int argc, char** argv) { } } if (FailFlag == 1) { - failed(""); + failed("\n"); } else { passed(); } diff --git a/tests/src/runtimeApi/cooperativeGrps/multi_gpu_streams.cpp b/tests/src/runtimeApi/cooperativeGrps/multi_gpu_streams.cpp index 28bba39785..a04caa6188 100644 --- a/tests/src/runtimeApi/cooperativeGrps/multi_gpu_streams.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/multi_gpu_streams.cpp @@ -97,7 +97,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << "hip error: " << hipGetErrorString(errval); std::cerr << std::endl; std::cerr << " Location: " << file << ":" << line << std::endl; - failed(""); + failed("\n"); } if (last_err != errval) { std::cerr << "Error: the return value of a function was not the same "; @@ -107,7 +107,7 @@ static inline void hipCheckAndFail(hipError_t errval, std::cerr << " (" << errval << ")" << std::endl; std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err); std::cerr << " (" << last_err << ")" << std::endl; - failed(""); + failed("\n"); } } #define hipCheckErr(errval) \ @@ -312,7 +312,7 @@ int main(int argc, char** argv) { std::cerr << std::endl; std::cerr << "You requested " << desired_blocks << " but we can only "; std::cerr << "fit " << (max_blocks_per_sm * num_sm) << std::endl; - failed(""); + failed("\n"); } /*************************************************************************/ @@ -653,7 +653,7 @@ int main(int argc, char** argv) { } } if (FailFlag == 1) { - failed(""); + failed("\n"); } else { passed(); } diff --git a/tests/src/runtimeApi/cooperativeGrps/multi_grid_group_all_gpus.cpp b/tests/src/runtimeApi/cooperativeGrps/multi_grid_group_all_gpus.cpp index 6958130e5c..e96b967838 100644 --- a/tests/src/runtimeApi/cooperativeGrps/multi_grid_group_all_gpus.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/multi_grid_group_all_gpus.cpp @@ -353,7 +353,7 @@ int main(int argc, char** argv) { std::cerr << "Requesting to run " << requested_blocks << " blocks, "; std::cerr << "but we can only guarantee to simultaneously run "; std::cerr << (max_blocks_per_sm * num_sm) << std::endl; - failed(""); + failed("\n"); } /*************************************************************************/ @@ -439,7 +439,7 @@ int main(int argc, char** argv) { int local_ret_val = verify_barrier_buffer(loops, requested_blocks, host_buffer[dev], num_devices); if (local_ret_val) { - failed(""); + failed("\n"); } } @@ -463,7 +463,7 @@ int main(int argc, char** argv) { free(host_buffer[k]); } if (flag == 1) { - failed(""); + failed("\n"); } else { passed(); } diff --git a/tests/src/runtimeApi/cooperativeGrps/simple_grid_group_barrier.cpp b/tests/src/runtimeApi/cooperativeGrps/simple_grid_group_barrier.cpp index 1e0d15529e..78760ae06e 100644 --- a/tests/src/runtimeApi/cooperativeGrps/simple_grid_group_barrier.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/simple_grid_group_barrier.cpp @@ -219,7 +219,7 @@ int main(int argc, char** argv) { std::cerr << "Requesting to run " << requested_blocks << " blocks, "; std::cerr << "but we can only guarantee to simultaneously run "; std::cerr << (max_blocks_per_sm * num_sms) << std::endl; - failed(""); + failed("\n"); } /*************************************************************************/ @@ -278,7 +278,7 @@ int main(int argc, char** argv) { HIPCHECK(hipFree(kernel_buffer)); HIPCHECK(hipFree(kernel_atomic)); if (ret_val == -1) { - failed(""); + failed("\n"); } else { passed(); } diff --git a/tests/src/runtimeApi/cooperativeGrps/simple_multi_grid_group_barrier.cpp b/tests/src/runtimeApi/cooperativeGrps/simple_multi_grid_group_barrier.cpp index 73e28026a0..05c4bf76a8 100644 --- a/tests/src/runtimeApi/cooperativeGrps/simple_multi_grid_group_barrier.cpp +++ b/tests/src/runtimeApi/cooperativeGrps/simple_multi_grid_group_barrier.cpp @@ -352,7 +352,7 @@ int main(int argc, char** argv) { std::cerr << "Requesting to run " << requested_blocks << " blocks, "; std::cerr << "but we can only guarantee to simultaneously run "; std::cerr << (max_blocks_per_sm * num_sm) << std::endl; - failed(""); + failed("\n"); } /*************************************************************************/ @@ -463,7 +463,7 @@ int main(int argc, char** argv) { } } if (flag == 1) { - failed(""); + failed("\n"); } else { passed(); } diff --git a/tests/src/runtimeApi/memory/hipIpcMemAccessTest.cpp b/tests/src/runtimeApi/memory/hipIpcMemAccessTest.cpp index 94142a76bd..18c0a282f2 100644 --- a/tests/src/runtimeApi/memory/hipIpcMemAccessTest.cpp +++ b/tests/src/runtimeApi/memory/hipIpcMemAccessTest.cpp @@ -236,7 +236,7 @@ int main() { IfTestPassed = true; #endif if (IfTestPassed == false) { - failed(""); + failed("\n"); } passed(); } diff --git a/tests/src/runtimeApi/memory/hipMallocManaged_MultiScenario.cpp b/tests/src/runtimeApi/memory/hipMallocManaged_MultiScenario.cpp index cb10682ef9..e1f17f3ec4 100644 --- a/tests/src/runtimeApi/memory/hipMallocManaged_MultiScenario.cpp +++ b/tests/src/runtimeApi/memory/hipMallocManaged_MultiScenario.cpp @@ -426,7 +426,7 @@ int main(int argc, char* argv[]) { OverAllStatus = false; } if (!OverAllStatus) { - failed(""); + failed("\n"); } } if (p_tests == 2) { diff --git a/tests/src/runtimeApi/memory/hipManagedKeyword.cpp b/tests/src/runtimeApi/memory/hipManagedKeyword.cpp index 33b114c97b..a3d714a6a3 100644 --- a/tests/src/runtimeApi/memory/hipManagedKeyword.cpp +++ b/tests/src/runtimeApi/memory/hipManagedKeyword.cpp @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) { OverAllStatus = false; } if (!OverAllStatus) { - failed(""); + failed("\n"); } passed(); } diff --git a/tests/src/runtimeApi/module/hipFuncSetSharedMemConfig.cpp b/tests/src/runtimeApi/module/hipFuncSetSharedMemConfig.cpp index 9365be25e2..7fa56fb8a1 100644 --- a/tests/src/runtimeApi/module/hipFuncSetSharedMemConfig.cpp +++ b/tests/src/runtimeApi/module/hipFuncSetSharedMemConfig.cpp @@ -111,6 +111,6 @@ int main() { if (IfTestPassed) { passed(); } else { - failed(""); + failed("\n"); } }