diff --git a/hipamd/.gitignore b/hipamd/.gitignore index 22cd23f2c6..3dfb1afef5 100644 --- a/hipamd/.gitignore +++ b/hipamd/.gitignore @@ -8,7 +8,7 @@ hip-amdinternal HIP-Examples lib packages - +build bin/hipInfo bin/hipBusBandwidth bin/hipDispatchLatency diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt index b3ea5a3ca3..7d4039b4b4 100644 --- a/hipamd/CMakeLists.txt +++ b/hipamd/CMakeLists.txt @@ -179,6 +179,7 @@ if(HIP_PLATFORM STREQUAL "hcc") src/hip_peer.cpp src/hip_stream.cpp src/hip_module.cpp + src/hip_db.cpp src/grid_launch.cpp src/env.cpp) diff --git a/hipamd/INSTALL.md b/hipamd/INSTALL.md index ef584dafa0..dc9ae41b9c 100644 --- a/hipamd/INSTALL.md +++ b/hipamd/INSTALL.md @@ -51,14 +51,14 @@ Run hipconfig (instructions below assume default installation path) : /opt/rocm/bin/hipconfig --full ``` -Compile and run the [square sample](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/tree/master/samples/0_Intro/square). +Compile and run the [square sample](https://github.com/ROCm-Developer-Tools/HIP/tree/master/samples/0_Intro/square). # Building HIP from source HIP source code is available and the project can be built from source on the HCC platform. 1. Follow the above steps to install and validate the binary packages. -2. Download HIP source code (from the [GitHub repot](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP).) +2. Download HIP source code (from the [GitHub repot](https://github.com/ROCm-Developer-Tools/HIP).) 3. Build and install HIP (This is the simple version assuming default paths ; see below for additional options.) ``` cd HIP diff --git a/hipamd/README.md b/hipamd/README.md index 565fd6a36d..568b105049 100644 --- a/hipamd/README.md +++ b/hipamd/README.md @@ -29,7 +29,7 @@ HIP releases are typically of two types. The tag naming convention is different - [Installation](INSTALL.md) - [HIP FAQ](docs/markdown/hip_faq.md) - [HIP Kernel Language](docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) - [HIP Porting Guide](docs/markdown/hip_porting_guide.md) - [HIP Porting Driver Guide](docs/markdown/hip_porting_driver_api.md) - [HIP Profiling ](docs/markdown/hip_profiling.md) @@ -122,8 +122,8 @@ make ## More Examples -The GitHub repository [HIP-Examples](https://github.com/GPUOpen-ProfessionalCompute-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/GPUOpen-ProfessionalCompute-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.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) ## Tour of the HIP Directories * **include**: @@ -141,6 +141,6 @@ The README with the procedures and tips the team used during this porting effort * **doc**: Documentation - markdown and doxygen info ## Reporting an issue -Use the [GitHub issue tracker] (https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues). +Use the [GitHub issue tracker](https://github.com/ROCm-Developer-Tools/HIP/issues). If reporting a bug, include the output of "hipconfig --full" and samples/1_hipInfo/hipInfo (if possible). diff --git a/hipamd/RELEASE.md b/hipamd/RELEASE.md index a1e580b7b0..d426f8563c 100644 --- a/hipamd/RELEASE.md +++ b/hipamd/RELEASE.md @@ -1,6 +1,6 @@ # Release notes -We have attempted to document known bugs and limitations - in particular the [HIP Kernel Language](docs/markdown/hip_kernel_language.md) document uses the phrase "Under Development", and the [HIP Runtime API bug list](http://gpuopen-professionalcompute-tools.github.io/HIP/bug.html) lists known bugs. +We have attempted to document known bugs and limitations - in particular the [HIP Kernel Language](docs/markdown/hip_kernel_language.md) document uses the phrase "Under Development", and the [HIP Runtime API bug list](http://rocm-developer-tools.github.io/HIP/bug.html) lists known bugs. =================================================================================================== @@ -113,7 +113,7 @@ Date: 2016.06.06 - Add cross-linking support between G++ and HCC, in particular for interfaces that use standard C++ libraries (ie std::vectors, std::strings). HIPCC now uses libstdc++ by default on the HCC compilation path. -- More samples including gpu-burn, SHOC, nbody, rtm. See [HIP-Examples](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP-Examples) +- More samples including gpu-burn, SHOC, nbody, rtm. See [HIP-Examples](https://github.com/ROCm-Developer-Tools/HIP-Examples) =================================================================================================== diff --git a/hipamd/bin/hipcc b/hipamd/bin/hipcc index bcd3e3a591..4a12b9e541 100755 --- a/hipamd/bin/hipcc +++ b/hipamd/bin/hipcc @@ -47,7 +47,7 @@ sub parse_config_file { } $verbose = $ENV{'HIPCC_VERBOSE'} // 0; -# Verbose: 0x1=commands, 0x2=paths, 0x4=hippc args +# Verbose: 0x1=commands, 0x2=paths, 0x4=hipcc args $HIP_PATH=$ENV{'HIP_PATH'} // dirname (dirname $0); # use parent directory of hipcc diff --git a/hipamd/include/hip/hcc_detail/grid_launch_GGL.hpp b/hipamd/include/hip/hcc_detail/grid_launch_GGL.hpp index eac48b595e..4c632f9d68 100644 --- a/hipamd/include/hip/hcc_detail/grid_launch_GGL.hpp +++ b/hipamd/include/hip/hcc_detail/grid_launch_GGL.hpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "helpers.hpp" #include "hc.hpp" -#include "hip_hcc.h" +#include "hip/hip_hcc.h" #include "hip_runtime.h" #include diff --git a/hipamd/include/hip/hcc_detail/hip_db.h b/hipamd/include/hip/hcc_detail/hip_db.h new file mode 100644 index 0000000000..eb5c3c0ac8 --- /dev/null +++ b/hipamd/include/hip/hcc_detail/hip_db.h @@ -0,0 +1,22 @@ +/** + * @defgroup HipDb HCC-specific debug facilities + * @{ + */ + + +/** + * @brief * Print memory tracker information for this pointer. + * + * HIP maintains a table for all memory allocations performed by the application. + * If targetAddress is 0, the entire table is printed to stderr. + * If targetAddress is non-null, this routine will perform some forensic analysis + * to find the pointer + */ +void hipdbPrintMem(void *targetAddress); + + + +// doxygen end HipDb +/** + * @} + */ diff --git a/hipamd/include/hip/hcc_detail/hip_hcc.h b/hipamd/include/hip/hcc_detail/hip_hcc.h deleted file mode 100644 index fc04917931..0000000000 --- a/hipamd/include/hip/hcc_detail/hip_hcc.h +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#ifndef HIP_INCLUDE_HIP_HCC_DETAIL_HIP_HCC_H -#define HIP_INCLUDE_HIP_HCC_DETAIL_HIP_HCC_H - -#include "hip/hip_runtime_api.h" - -#if __cplusplus -#ifdef __HCC__ -#include - - -/** - *------------------------------------------------------------------------------------------------- - *------------------------------------------------------------------------------------------------- - * @defgroup HCC-specific features - * @warning These APIs provide access to special features of HCC compiler and are not available through the CUDA path. - * @{ - */ - - -/** - * @brief Return hc::accelerator associated with the specified deviceId - * @return #hipSuccess, #hipErrorInvalidDevice - */ -hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator *acc); - -/** - * @brief Return hc::accelerator_view associated with the specified stream - * - * If stream is 0, the accelerator_view for the default stream is returned. - * @return #hipSuccess - */ -hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view **av); - - -#endif // #ifdef __HCC__ - -/** - * @brief launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra - * - * @param [in[ f Kernel to launch. - * @param [in] gridDimX X grid dimension specified in work-items - * @param [in] gridDimY Y grid dimension specified in work-items - * @param [in] gridDimZ Z grid dimension specified in work-items - * @param [in] blockDimX X block dimensions specified in work-items - * @param [in] blockDimY Y grid dimension specified in work-items - * @param [in] blockDimZ Z grid dimension specified in work-items - * @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The kernel can access this with HIP_DYNAMIC_SHARED. - * @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th default stream is used with associated synchronization rules. - * @param [in] kernelParams - * @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and must be in the memory layout and alignment expected by the kernel. - * @param [in] startEvent If non-null, specified event will be updated to track the start time of the kernel launch. The event must be created before calling this API. - * @param [in] stopEvent If non-null, specified event will be updated to track the stop time of the kernel launch. The event must be created before calling this API. - * - * @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue - * - * @warning kernellParams argument is not yet implemented in HIP. Please use extra instead. Please refer to hip_porting_driver_api.md for sample usage. - - * HIP/ROCm actually updates the start event when the associated kernel completes. - */ -hipError_t hipHccModuleLaunchKernel(hipFunction_t f, - uint32_t globalWorkSizeX, - uint32_t globalWorkSizeY, - uint32_t globalWorkSizeZ, - uint32_t localWorkSizeX, - uint32_t localWorkSizeY, - uint32_t localWorkSizeZ, - size_t sharedMemBytes, - hipStream_t hStream, - void **kernelParams, - void **extra, - hipEvent_t startEvent=nullptr, - hipEvent_t stopEvent=nullptr - ); - -// doxygen end HCC-specific features -/** - * @} - */ -#endif // #if __cplusplus - -#endif // diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index 724bf09b21..2036aa5008 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -1867,7 +1867,7 @@ hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,int device); * * @returns #hipSuccess, #hipErrorInavlidDevice, #hipErrorInvalidValue */ -hipError_t hipDeviceGetByPCIBusId ( int* device,const int* pciBusId ); +hipError_t hipDeviceGetByPCIBusId ( int* device,const char* pciBusId ); /** diff --git a/hipamd/include/hip/hip_hcc.h b/hipamd/include/hip/hip_hcc.h index 3407a311bd..582d544eb9 100644 --- a/hipamd/include/hip/hip_hcc.h +++ b/hipamd/include/hip/hip_hcc.h @@ -23,8 +23,83 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_HIP_HCC_H #define HIP_INCLUDE_HIP_HIP_HCC_H -#if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__) -#include "hip/hcc_detail/hip_hcc.h" -#endif +#ifdef __HCC__ -#endif +#include "hip/hip_runtime_api.h" + +// Forward declarations: +namespace hc { + class accelerator; + class accelerator_view; +}; + + +/** + *------------------------------------------------------------------------------------------------- + *------------------------------------------------------------------------------------------------- + * @defgroup HCC-specific features + * @warning These APIs provide access to special features of HCC compiler and are not available through the CUDA path. + * @{ + */ + + +/** + * @brief Return hc::accelerator associated with the specified deviceId + * @return #hipSuccess, #hipErrorInvalidDevice + */ +hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator *acc); + +/** + * @brief Return hc::accelerator_view associated with the specified stream + * + * If stream is 0, the accelerator_view for the default stream is returned. + * @return #hipSuccess + */ +hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view **av); + + + +/** + * @brief launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra + * + * @param [in[ f Kernel to launch. + * @param [in] gridDimX X grid dimension specified in work-items + * @param [in] gridDimY Y grid dimension specified in work-items + * @param [in] gridDimZ Z grid dimension specified in work-items + * @param [in] blockDimX X block dimensions specified in work-items + * @param [in] blockDimY Y grid dimension specified in work-items + * @param [in] blockDimZ Z grid dimension specified in work-items + * @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The kernel can access this with HIP_DYNAMIC_SHARED. + * @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th default stream is used with associated synchronization rules. + * @param [in] kernelParams + * @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and must be in the memory layout and alignment expected by the kernel. + * @param [in] startEvent If non-null, specified event will be updated to track the start time of the kernel launch. The event must be created before calling this API. + * @param [in] stopEvent If non-null, specified event will be updated to track the stop time of the kernel launch. The event must be created before calling this API. + * + * @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue + * + * @warning kernellParams argument is not yet implemented in HIP. Please use extra instead. Please refer to hip_porting_driver_api.md for sample usage. + + * HIP/ROCm actually updates the start event when the associated kernel completes. + */ +hipError_t hipHccModuleLaunchKernel(hipFunction_t f, + uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, + uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, + uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, + size_t sharedMemBytes, + hipStream_t hStream, + void **kernelParams, + void **extra, + hipEvent_t startEvent=nullptr, + hipEvent_t stopEvent=nullptr + ); + +// doxygen end HCC-specific features +/** + * @} + */ +#endif // #ifdef __HCC__ +#endif // #ifdef HIP_INCLUDE_HIP_HIP_HCC_H diff --git a/hipamd/include/hip/hip_runtime_api.h b/hipamd/include/hip/hip_runtime_api.h index dc163d5c25..0cdace0e99 100644 --- a/hipamd/include/hip/hip_runtime_api.h +++ b/hipamd/include/hip/hip_runtime_api.h @@ -102,6 +102,7 @@ typedef struct hipDeviceProp_t { int clockInstructionRate; ///< Frequency in khz of the timer used by the device-side "clock*" instructions. New for HIP. hipDeviceArch_t arch; ///< Architectural feature flags. New for HIP. int concurrentKernels; ///< Device can possibly execute multiple kernels concurrently. + int pciDomainID; ///< PCI Domain ID int pciBusID; ///< PCI Bus ID. int pciDeviceID; ///< PCI Device ID. size_t maxSharedMemoryPerMultiProcessor; ///< Maximum Shared Memory Per Multiprocessor. diff --git a/hipamd/include/hip/nvcc_detail/hip_runtime_api.h b/hipamd/include/hip/nvcc_detail/hip_runtime_api.h index b1011aac6c..502d205ac4 100644 --- a/hipamd/include/hip/nvcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/nvcc_detail/hip_runtime_api.h @@ -873,12 +873,12 @@ inline static hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device) inline static hipError_t hipDeviceGetPCIBusId(char* pciBusId,int len,hipDevice_t device) { - return hipCUResultTohipError(cuDeviceGetPCIBusId(pciBusId,len,device)); + return hipCUDAErrorTohipError(cudaDeviceGetPCIBusId(pciBusId,len,device)); } -inline static hipError_t hipDeviceGetByPCIBusId(int* device, const int *pciBusId) +inline static hipError_t hipDeviceGetByPCIBusId(int* device, const char *pciBusId) { - return hipCUDAErrorTohipError(cudaDeviceGetByPCIBusId(device,(char*)pciBusId)); + return hipCUDAErrorTohipError(cudaDeviceGetByPCIBusId(device, pciBusId)); } inline static hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit) diff --git a/hipamd/packaging/convert_md_to_html.sh b/hipamd/packaging/convert_md_to_html.sh index b2c868cded..e6442a9ef2 100755 --- a/hipamd/packaging/convert_md_to_html.sh +++ b/hipamd/packaging/convert_md_to_html.sh @@ -54,8 +54,8 @@ popd # replace github.io links pushd $html_destdir -sed -i "s?http://gpuopen-professionalcompute-tools.github.io/HIP?docs/RuntimeAPI/html/index.html?g" README.html -sed -i "s?http://gpuopen-professionalcompute-tools.github.io/HIP?docs/RuntimeAPI/html/?g" RELEASE.html +sed -i "s?http://rocm-developer-tools.github.io/HIP?docs/RuntimeAPI/html/index.html?g" README.html +sed -i "s?http://rocm-developer-tools.github.io/HIP?docs/RuntimeAPI/html/?g" RELEASE.html popd exit 0 diff --git a/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp b/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp index cf4660eae7..0401745efd 100644 --- a/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp +++ b/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp @@ -129,6 +129,7 @@ void printDeviceProp (int deviceId) cout << setw(w1) << "arch.hasSurfaceFuncs: " << props.arch.hasSurfaceFuncs << endl; cout << setw(w1) << "arch.has3dGrid: " << props.arch.has3dGrid << endl; cout << setw(w1) << "arch.hasDynamicParallelism: " << props.arch.hasDynamicParallelism << endl; + cout << setw(w1) << "gcnArch: " << props.gcnArch << endl; int deviceCnt; hipGetDeviceCount(&deviceCnt); diff --git a/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md b/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md index 5e9483b595..ab5dbdc958 100644 --- a/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md +++ b/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md @@ -7,7 +7,7 @@ This tutorial shows how to get write simple HIP application. We will write the s HIP is a C++ runtime API and kernel language that allows developers to create portable applications that can run on AMD and other GPU’s. Our goal was to rise above the lowest-common-denominator paths and deliver a solution that allows you, the developer, to use essential hardware features and maximize your application’s performance on GPU hardware. ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -90,11 +90,11 @@ Use the make command and execute it using ./exe Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [hipify-clang](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/hipify-clang/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [hipify-clang](https://github.com/ROCm-Developer-Tools/HIP/hipify-clang/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/10_inline_asm/Readme.md b/hipamd/samples/2_Cookbook/10_inline_asm/Readme.md index 8c98547220..0e64fe9c6e 100644 --- a/hipamd/samples/2_Cookbook/10_inline_asm/Readme.md +++ b/hipamd/samples/2_Cookbook/10_inline_asm/Readme.md @@ -15,7 +15,7 @@ For more information: [User Guide for AMDGPU Back-end](llvm.org/docs/AMDGPUUsage.html) ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -37,11 +37,11 @@ Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md b/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md index e3ec8ad780..ea4f3a67e9 100644 --- a/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md +++ b/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md @@ -7,7 +7,7 @@ This tutorial is follow-up of the previous one where we learn how to write our f Memory transfer and kernel execution are the most important parameter in parallel computing (specially HPC and machine learning). Memory bottlenecks is the main problem why we are not able to get the highest performance, therefore obtaining the memory transfer timing and kernel execution timing plays key role in application optimization. ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -64,11 +64,11 @@ Use the make command and execute it using ./exe Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [hipify-clang](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/hipify-clang/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [hipify-clang](https://github.com/ROCm-Developer-Tools/HIP/hipify-clang/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/2_Profiler/Readme.md b/hipamd/samples/2_Cookbook/2_Profiler/Readme.md index 92a8be228e..4059e42193 100644 --- a/hipamd/samples/2_Cookbook/2_Profiler/Readme.md +++ b/hipamd/samples/2_Cookbook/2_Profiler/Readme.md @@ -37,11 +37,11 @@ You can also print the HIP function strings to stderr using HIP_TRACE_API enviro Note this trace mode uses colors. "less -r" can handle raw control characters and will display the debug output in proper colors. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [hipify-clang](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/hipify-clang/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [hipify-clang](https://github.com/ROCm-Developer-Tools/HIP/hipify-clang/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/3_shared_memory/Readme.md b/hipamd/samples/2_Cookbook/3_shared_memory/Readme.md index 6b9393397c..8b9e102ec9 100644 --- a/hipamd/samples/2_Cookbook/3_shared_memory/Readme.md +++ b/hipamd/samples/2_Cookbook/3_shared_memory/Readme.md @@ -7,7 +7,7 @@ Earlier we learned how to write our first hip program, in which we compute Matri As we mentioned earlier that Memory bottlenecks is the main problem why we are not able to get the highest performance, therefore minimizing the latency for memory access plays prominent role in application optimization. In this tutorial, we'll learn how to use static shared memory and will explain the dynamic one latter. ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -32,11 +32,11 @@ Use the make command and execute it using ./exe Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/4_shfl/Readme.md b/hipamd/samples/2_Cookbook/4_shfl/Readme.md index da62901851..923d2f3837 100644 --- a/hipamd/samples/2_Cookbook/4_shfl/Readme.md +++ b/hipamd/samples/2_Cookbook/4_shfl/Readme.md @@ -15,7 +15,7 @@ Let's talk about Warp first. The kernel code is executed in groups of fixed numb ` float __shfl_xor (float var, int laneMask, int width=warpSize); ` ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -41,11 +41,11 @@ Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia please make sure you have a 3.0 or higher compute capable device in order to use warp shfl operations and add `-gencode arch=compute=30, code=sm_30` nvcc flag in the Makefile while using this application. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/5_2dshfl/Readme.md b/hipamd/samples/2_Cookbook/5_2dshfl/Readme.md index fba114152a..8efff49d8e 100644 --- a/hipamd/samples/2_Cookbook/5_2dshfl/Readme.md +++ b/hipamd/samples/2_Cookbook/5_2dshfl/Readme.md @@ -15,7 +15,7 @@ Let's talk about Warp first. The kernel code is executed in groups of fixed numb ` float __shfl_xor (float var, int laneMask, int width=warpSize); ` ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -41,11 +41,11 @@ Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia please make sure you have a 3.0 or higher compute capable device in order to use warp shfl operations and add `-gencode arch=compute=30, code=sm_30` nvcc flag in the Makefile while using this application. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/6_dynamic_shared/Readme.md b/hipamd/samples/2_Cookbook/6_dynamic_shared/Readme.md index a10fd56a95..15ea299a9c 100644 --- a/hipamd/samples/2_Cookbook/6_dynamic_shared/Readme.md +++ b/hipamd/samples/2_Cookbook/6_dynamic_shared/Readme.md @@ -7,7 +7,7 @@ Earlier we learned how to use static shared memory. In this tutorial, we'll expl As we mentioned earlier that Memory bottlenecks is the main problem why we are not able to get the highest performance, therefore minimizing the latency for memory access plays prominent role in application optimization. In this tutorial, we'll learn how to use dynamic shared memory. ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -37,11 +37,11 @@ Use the make command and execute it using ./exe Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/7_streams/Readme.md b/hipamd/samples/2_Cookbook/7_streams/Readme.md index a75149925e..ca295d3f49 100644 --- a/hipamd/samples/2_Cookbook/7_streams/Readme.md +++ b/hipamd/samples/2_Cookbook/7_streams/Readme.md @@ -7,7 +7,7 @@ In all Earlier tutorial we used single stream, In this tutorial, we'll explain h The various instances of kernel to be executed on device in exact launch order defined by Host are called streams. We can launch multiple streams on a single device. We will learn how to learn two streams which can we scaled with ease. ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -47,11 +47,11 @@ Use the make command and execute it using ./exe Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/samples/2_Cookbook/9_unroll/Readme.md b/hipamd/samples/2_Cookbook/9_unroll/Readme.md index 3c2635c0eb..194eb9c7ff 100644 --- a/hipamd/samples/2_Cookbook/9_unroll/Readme.md +++ b/hipamd/samples/2_Cookbook/9_unroll/Readme.md @@ -8,7 +8,7 @@ Loop unrolling optimization hints can be specified with #pragma unroll and #prag Specifying #pragma unroll without a parameter directs the loop unroller to attempt to fully unroll the loop if the trip count is known at compile time and attempt to partially unroll the loop if the trip count is not known at compile time. ## Requirement: -For hardware requirement and software installation [Installation](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/INSTALL.md) +For hardware requirement and software installation [Installation](https://github.com/ROCm-Developer-Tools/HIP/INSTALL.md) ## prerequiste knowledge: @@ -38,11 +38,11 @@ Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia please make sure you have a 3.0 or higher compute capable device in order to use warp shfl operations and add `-gencode arch=compute=30, code=sm_30` nvcc flag in the Makefile while using this application. ## More Info: -- [HIP FAQ](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_faq.md) -- [HIP Kernel Language](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_kernel_language.md) -- [HIP Runtime API (Doxygen)](http://gpuopen-professionalcompute-tools.github.io/HIP) -- [HIP Porting Guide](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_porting_guide.md) -- [HIP Terminology](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/clang-hipify/README.md) -- [Developer/CONTRIBUTING Info](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/CONTRIBUTING.md) -- [Release Notes](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/RELEASE.md) +- [HIP FAQ](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_faq.md) +- [HIP Kernel Language](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_kernel_language.md) +- [HIP Runtime API (Doxygen)](http://rocm-developer-tools.github.io/HIP) +- [HIP Porting Guide](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_porting_guide.md) +- [HIP Terminology](https://github.com/ROCm-Developer-Tools/HIP/docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) +- [clang-hipify](https://github.com/ROCm-Developer-Tools/HIP/clang-hipify/README.md) +- [Developer/CONTRIBUTING Info](https://github.com/ROCm-Developer-Tools/HIP/CONTRIBUTING.md) +- [Release Notes](https://github.com/ROCm-Developer-Tools/HIP/RELEASE.md) diff --git a/hipamd/src/hip_db.cpp b/hipamd/src/hip_db.cpp new file mode 100644 index 0000000000..21fa677fe6 --- /dev/null +++ b/hipamd/src/hip_db.cpp @@ -0,0 +1,12 @@ + +#include "hcc/hc_am.hpp" + + + + +void hipdbPrintMem(void *targetAddress) +{ + hc::am_memtracker_print(targetAddress); +}; + + diff --git a/hipamd/src/hip_device.cpp b/hipamd/src/hip_device.cpp index 2bb9970d35..9086cd8012 100644 --- a/hipamd/src/hip_device.cpp +++ b/hipamd/src/hip_device.cpp @@ -376,15 +376,10 @@ hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len, int device) e = hipErrorInvalidDevice; } else { if((pciBusId != nullptr) && (len > 0)) { - int tempPciBusId = 0; - e = ihipDeviceGetAttribute( &tempPciBusId, hipDeviceAttributePciBusId, device); - if( e == hipSuccess) { - std::string tempPciStr = std::to_string(tempPciBusId); - if( len < tempPciStr.length()){ - e = hipErrorInvalidValue; - } else { - memcpy( pciBusId , tempPciStr.c_str() , tempPciStr.length() ); - } + auto deviceHandle = ihipGetDevice(device); + int retVal = snprintf(pciBusId,len, "%04x:%02x:%02x.0",deviceHandle->_props.pciDomainID,deviceHandle->_props.pciBusID,deviceHandle->_props.pciDeviceID); + if( retVal > 0 && retVal < len) { + e = hipSuccess; } } } @@ -400,21 +395,29 @@ hipError_t hipDeviceTotalMem (size_t *bytes,hipDevice_t device) return ihipLogStatus(e); } -hipError_t hipDeviceGetByPCIBusId (int* device, const int* pciBusId ) +hipError_t hipDeviceGetByPCIBusId (int* device, const char* pciBusId ) { HIP_INIT_API(device,pciBusId); hipDeviceProp_t tempProp; - int deviceCount; + int deviceCount = 0 ; hipError_t e = hipErrorInvalidValue; - ihipGetDeviceCount( &deviceCount ); - *device = 0; - for (int i = 0; i< deviceCount; i++) { - ihipGetDeviceProperties( &tempProp, i ); - if(tempProp.pciBusID == *pciBusId) { - *device =i; - e = hipSuccess; - break; - } + if((device != nullptr) && (pciBusId != nullptr)) { + int pciBusID = -1; + int pciDeviceID = -1; + int pciDomainID = -1; + int len = 0; + len = sscanf (pciBusId,"%04x:%02x:%02x",&pciDomainID,&pciBusID,&pciDeviceID); + if(len == 3) { + ihipGetDeviceCount( &deviceCount ); + for (int i = 0; i< deviceCount; i++) { + ihipGetDeviceProperties( &tempProp, i ); + if(tempProp.pciBusID == pciBusID) { + *device = i; + e = hipSuccess; + break; + } + } + } } return ihipLogStatus(e); } diff --git a/hipamd/src/hip_hcc.cpp b/hipamd/src/hip_hcc.cpp index be591f2f04..39466aa834 100644 --- a/hipamd/src/hip_hcc.cpp +++ b/hipamd/src/hip_hcc.cpp @@ -92,7 +92,7 @@ int HIP_SYNC_HOST_ALLOC = 1; // Chicken bit to sync on host to implement null stream. // If 0, null stream synchronization is performed on the GPU -int HIP_SYNC_NULL_STREAM = 0; +int HIP_SYNC_NULL_STREAM = 1; // HIP needs to change some behavior based on HCC_OPT_FLUSH : // TODO - set this to 1 @@ -737,21 +737,7 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) char archName[256]; err = hsa_agent_get_info(_hsaAgent, HSA_AGENT_INFO_NAME, &archName); - if(strcmp(archName,"gfx701")==0){ - prop->gcnArch = 701; - } - if(strcmp(archName,"gfx801")==0){ - prop->gcnArch = 801; - } - if(strcmp(archName,"gfx802")==0){ - prop->gcnArch = 802; - } - if(strcmp(archName,"gfx803")==0){ - prop->gcnArch = 803; - } - if(strcmp(archName,"gfx900")==0){ - prop->gcnArch = 900; - } + prop->gcnArch = atoi(archName+3); DeviceErrorCheck(err); @@ -799,7 +785,7 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) DeviceErrorCheck(err); // BDFID is 16bit uint: [8bit - BusID | 5bit - Device ID | 3bit - Function/DomainID] - // prop->pciDomainID = bdf_id & 0x7; + prop->pciDomainID = bdf_id & 0x7; prop->pciDeviceID = (bdf_id>>3) & 0x1F; prop->pciBusID = (bdf_id>>8) & 0xFF;