From 62747f5b91f15f75ca13c6b5d0f9d83667c8d8d9 Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Sat, 1 Oct 2016 13:41:09 -0500 Subject: [PATCH 01/30] updated symbol usage in docs Change-Id: I522c793f9cfa6a912dcb4a3d0044e94de3d3cd0e [ROCm/clr commit: 64a13661982e3ffa722bc8ac6d5ac75116f6c304] --- .../hipamd/docs/markdown/hip_porting_guide.md | 64 +++++++++++++------ 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/projects/clr/hipamd/docs/markdown/hip_porting_guide.md b/projects/clr/hipamd/docs/markdown/hip_porting_guide.md index 45e5455ea4..148f3a09dd 100644 --- a/projects/clr/hipamd/docs/markdown/hip_porting_guide.md +++ b/projects/clr/hipamd/docs/markdown/hip_porting_guide.md @@ -411,29 +411,55 @@ For example: Device Code: ``` -// Cuda Device Code -__constant__ float Array[1024]; -__global__ void Inc(float *Out){ - Int tx = hipThreadIdx_x; - Out[tx] = Array[tx] + 1; +#include +#include +#include + +#ifdef __HIP_PLATFORM_HCC__ +__global__ void Inc(hipLaunchParm lp, float *Ad, float *Out) +#endif +#ifdef __HIP_PLATFORM_NVCC__ +__constant__ float Ad[1024]; +__global__ void Inc(hipLaunchParm lp, float *Out) +#endif +{ + int tx = hipThreadIdx_x; + Out[tx] = Ad[tx] + 1.0f; } - -// HIP Device Code -__global__ void Inc(hipLaunchParm lp, float *Array, float *Out){ - Int tx = hipThreadIdx_x; - Out[tx] = Array[tx] + 1; + +int main() +{ + float *A, *Ad; + float *Out, *Outd; + A = new float[1024]; + Out = new float[1024]; + + for(uint32_t i=0;i<1024;i++) + { + A[i] = 1.0f*i; + Out[i] = 0.0f; + } + + hipMalloc((void**)&Ad, 1024*sizeof(float)); + hipMalloc((void**)&Outd, 1024*sizeof(float)); + + hipMemcpy(Outd, Out, 1024*sizeof(float), hipMemcpyHostToDevice); + +#ifdef __HIP_PLATFORM_HCC__ + assert(hipSuccess == hipMemcpy(Ad, A, 1024*sizeof(float), hipMemcpyHostToDevice)); + hipLaunchKernel(Inc, dim3(1,1,1), dim3(1024,1,1), 0, 0, Ad, Outd); +#endif +#ifdef __HIP_PLATFORM_NVCC__ + assert(hipSuccess == hipMemcpyToSymbol(Ad, A, 1024*sizeof(float))); + hipLaunchKernel(Inc, dim3(1,1,1), dim3(1024,1,1), 0, 0, Outd); +#endif + + hipMemcpy(Out, Outd, 1024*sizeof(float), hipMemcpyDeviceToHost); + std::cout< Date: Sat, 1 Oct 2016 14:32:48 -0500 Subject: [PATCH 02/30] fix test args Change-Id: If18eb2a5e504accb72a25716aafb6867002fefb2 [ROCm/clr commit: bf3ce40fb1727fb4f6d507b08e8a9fad77160202] --- .../clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp index a7e05c53f4..94ab7fa73b 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp @@ -326,7 +326,7 @@ void parseMyArguments(int argc, char *argv[]) int main(int argc, char *argv[]) { - HipTest::parseStandardArguments(argc, argv, true); + HipTest::parseStandardArguments(argc, argv, false); parseMyArguments(argc, argv); From 77014b31654e91ee733bfff3e6c1beee633dcc9e Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Sun, 2 Oct 2016 05:56:38 -0500 Subject: [PATCH 03/30] disable DB_SHOW_TID Change-Id: Ia415437e8ba9903de149997380f61f1272488642 [ROCm/clr commit: 0bcb54be35c58693e9a8d4e810e312c1d111b069] --- projects/clr/hipamd/include/hcc_detail/hip_hcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/include/hcc_detail/hip_hcc.h b/projects/clr/hipamd/include/hcc_detail/hip_hcc.h index 09f38ec331..f3967247a6 100644 --- a/projects/clr/hipamd/include/hcc_detail/hip_hcc.h +++ b/projects/clr/hipamd/include/hcc_detail/hip_hcc.h @@ -109,7 +109,7 @@ extern const char *API_COLOR_END; #endif -#define DB_SHOW_TID 1 +#define DB_SHOW_TID 0 #if DB_SHOW_TID #define COMPUTE_TID_STR \ From 2606f22c7f91408f8d317f1eb4e4baa3b27654a0 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Sun, 2 Oct 2016 05:57:02 -0500 Subject: [PATCH 04/30] small typo fix Change-Id: I01906b330be8e6ec149bcdfe82def73e15931c89 [ROCm/clr commit: e413869271dca593e6820437fbc6fd998d71d65c] --- projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md b/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md index 16285120fa..bf5df9c763 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md +++ b/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md @@ -17,7 +17,7 @@ Programmers familiar with CUDA, OpenCL will be able to quickly learn and start c We will be using the Simple Matrix Transpose application from the previous tutorial and modify it to learn how to get the performance score for memory transfer and kernel execution time. -## hipEnvent_t +## hipEvent_t We'll learn how to use the event management functionality of HIP runtime api. In the same sourcecode, we used for MatrixTranspose we will declare the following events as follows: From f64e21459ed560e7afa3cd56531644dd66b23a7f Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 3 Oct 2016 22:52:23 +0530 Subject: [PATCH 05/30] cmake: Fix identations Change-Id: Iecc79f030968a2b67bfa41218d0a4edbd2594f63 [ROCm/clr commit: 4cc035b8944cfff38d8846eec757289912bc31ff] --- projects/clr/hipamd/CMakeLists.txt | 127 +++++++++++++++-------------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index cd754db4d0..5bdba928ae 100644 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -16,8 +16,8 @@ endmacro() ############################# # Determine HIP_BASE_VERSION execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/hipconfig --version - OUTPUT_VARIABLE HIP_BASE_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_VARIABLE HIP_BASE_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION}) list(GET VERSION_LIST 0 HIP_VERSION_MAJOR) list(GET VERSION_LIST 1 HIP_VERSION_MINOR) @@ -27,11 +27,11 @@ list(GET VERSION_LIST 1 HIP_VERSION_MINOR) # use the commit date, instead of build date # add xargs to remove strange trailing newline character execute_process(COMMAND git show -s --format=@%ct - COMMAND xargs - COMMAND date -f - --utc +%y%U%w - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE HIP_VERSION_PATCH - OUTPUT_STRIP_TRAILING_WHITESPACE) + COMMAND xargs + COMMAND date -f - --utc +%y%U%w + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE HIP_VERSION_PATCH + OUTPUT_STRIP_TRAILING_WHITESPACE) set(HIP_VERSION $HIP_VERSION_MAJOR.$HIP_VERSION_MINOR.$HIP_VERSION_PATCH) add_to_config(_versionInfo HIP_VERSION_MAJOR) @@ -45,8 +45,8 @@ add_to_config(_versionInfo HIP_VERSION_PATCH) if(NOT DEFINED HIP_PLATFORM) if(NOT DEFINED ENV{HIP_PLATFORM}) execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/hipconfig --platform - OUTPUT_VARIABLE HIP_PLATFORM - OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_VARIABLE HIP_PLATFORM + OUTPUT_STRIP_TRAILING_WHITESPACE) else() set(HIP_PLATFORM $ENV{HIP_PLATFORM} CACHE STRING "HIP Platform") endif() @@ -68,9 +68,9 @@ if(HIP_PLATFORM STREQUAL "hcc") endif() if(IS_ABSOLUTE ${HCC_HOME} AND EXISTS ${HCC_HOME} AND IS_DIRECTORY ${HCC_HOME}) execute_process(COMMAND ${HCC_HOME}/bin/hcc --version - COMMAND cut -d\ -f9 - OUTPUT_VARIABLE HCC_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) + COMMAND cut -d\ -f9 + OUTPUT_VARIABLE HCC_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) message(STATUS "Looking for HCC in: " ${HCC_HOME} ". Found version: " ${HCC_VERSION}) else() message(FATAL_ERROR "Don't know where to find HCC. Please specify abolute path using -DHCC_HOME") @@ -100,9 +100,9 @@ endif() # Determine HIP install path if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND CMAKE_INSTALL_PREFIX MATCHES "/usr/local") if(CMAKE_BUILD_TYPE MATCHES Debug) - set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Installation path for HIP" FORCE) + set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Installation path for HIP" FORCE) elseif(CMAKE_BUILD_TYPE MATCHES Release) - set(CMAKE_INSTALL_PREFIX "/opt/rocm/hip" CACHE PATH "Installation path for HIP" FORCE) + set(CMAKE_INSTALL_PREFIX "/opt/rocm/hip" CACHE PATH "Installation path for HIP" FORCE) else() message(FATAL_ERROR "Invalid CMAKE_BUILD_TYPE specified. Valid values are Debug and Release") endif() @@ -175,17 +175,17 @@ if(HIP_PLATFORM STREQUAL "hcc") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_HCC_BUILD_FLAGS}") set(SOURCE_FILES src/device_util.cpp - src/hip_hcc.cpp - src/hip_context.cpp - src/hip_device.cpp - src/hip_error.cpp - src/hip_event.cpp - src/hip_ldg.cpp - src/hip_memory.cpp - src/hip_peer.cpp - src/hip_stream.cpp - src/hip_fp16.cpp - src/hip_module.cpp) + src/hip_hcc.cpp + src/hip_context.cpp + src/hip_device.cpp + src/hip_error.cpp + src/hip_event.cpp + src/hip_ldg.cpp + src/hip_memory.cpp + src/hip_peer.cpp + src/hip_stream.cpp + src/hip_fp16.cpp + src/hip_module.cpp) if(${HIP_LIB_TYPE} EQUAL 0) add_library(hip_hcc OBJECT ${SOURCE_FILES}) @@ -211,7 +211,7 @@ file(WRITE "${PROJECT_BINARY_DIR}/.version" ${_versionInfo}) # Build doxygen documentation add_custom_target(doc COMMAND HIP_PATH=${CMAKE_CURRENT_SOURCE_DIR} doxygen ${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen-input/doxy.cfg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs) ############################# # Install steps @@ -233,7 +233,7 @@ install(FILES ${PROJECT_BINARY_DIR}/.version DESTINATION bin) # Install src, bin, include & cmake if necessary execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE INSTALL_SOURCE) + RESULT_VARIABLE INSTALL_SOURCE) if(NOT ${INSTALL_SOURCE} EQUAL 0) install(DIRECTORY src DESTINATION .) install(DIRECTORY bin DESTINATION . USE_SOURCE_PERMISSIONS) @@ -250,12 +250,12 @@ configure_file(packaging/hip_base.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) configure_file(packaging/hip_base.postinst ${BUILD_DIR}/postinst @ONLY) configure_file(packaging/hip_base.prerm ${BUILD_DIR}/prerm @ONLY) add_custom_target(pkg_hip_base COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR}) + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR}) # Package: hip_hcc set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_hcc) @@ -263,46 +263,46 @@ configure_file(packaging/hip_hcc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) configure_file(packaging/hip_hcc.postinst ${BUILD_DIR}/postinst @ONLY) configure_file(packaging/hip_hcc.prerm ${BUILD_DIR}/prerm @ONLY) add_custom_target(pkg_hip_hcc COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR} - DEPENDS hip_hcc) + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR} + DEPENDS hip_hcc) # Package: hip_nvcc set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_nvcc) configure_file(packaging/hip_nvcc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) add_custom_target(pkg_hip_nvcc COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR}) + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR}) # Package: hip_doc set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_doc) configure_file(packaging/hip_doc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) add_custom_target(pkg_hip_doc COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR}) + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR}) # Package: hip_samples set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_samples) configure_file(packaging/hip_samples.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) add_custom_target(pkg_hip_samples COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR}) + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR}) # Package: all if(POLICY CMP0037) @@ -325,14 +325,15 @@ if(POLICY CMP0037) cmake_policy(SET CMP0037 OLD) endif() add_custom_target(install_for_test COMMAND "${CMAKE_COMMAND}" --build . --target install - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) execute_process(COMMAND getconf _NPROCESSORS_ONLN OUTPUT_VARIABLE DASH_JAY OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_target(test COMMAND ${CMAKE_COMMAND} . - COMMAND make -j ${DASH_JAY} - COMMAND make test - WORKING_DIRECTORY ${BUILD_DIR} - DEPENDS install_for_test) + COMMAND make -j ${DASH_JAY} + COMMAND make test + WORKING_DIRECTORY ${BUILD_DIR} + DEPENDS install_for_test) if(POLICY CMP0037) cmake_policy(POP) endif() +# vim: ts=4:sw=4:expandtab:smartindent From 21ef342e6523661a067dfe7e6f0a37f8eb0abc54 Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Mon, 3 Oct 2016 12:38:41 -0500 Subject: [PATCH 06/30] Stream fix on nvcc hipMemsetAsync Change-Id: Ia0eb81dff0f422af55d93b4635d42e9aa6921377 [ROCm/clr commit: 3edff7dd3bd9bd59dfbf2951911591fd24161970] --- projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h b/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h index a36b951400..b5dee3898f 100644 --- a/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h +++ b/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h @@ -329,8 +329,8 @@ inline static hipError_t hipMemset(void* devPtr,int value, size_t count) { return hipCUDAErrorTohipError(cudaMemset(devPtr, value, count)); } -inline static hipError_t hipMemsetAsync(void* devPtr,int value, size_t count) { - return hipCUDAErrorTohipError(cudaMemsetAsync(devPtr, value, count)); +inline static hipError_t hipMemsetAsync(void* devPtr,int value, size_t count, hipStream stream = 0) { + return hipCUDAErrorTohipError(cudaMemsetAsync(devPtr, value, count, stream)); } inline static hipError_t hipGetDeviceProperties(hipDeviceProp_t *p_prop, int device) From c47374f479a0289bab8cfffa9aefb6e53c9174f7 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Mon, 3 Oct 2016 19:05:19 -0500 Subject: [PATCH 07/30] Fix hipMemSetAsync compilation, bounds check on name copy [ROCm/clr commit: 48849feba3077c3c087e3089a8cbf5231a482ce1] --- projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h b/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h index b5dee3898f..4088064f87 100644 --- a/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h +++ b/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h @@ -329,7 +329,7 @@ inline static hipError_t hipMemset(void* devPtr,int value, size_t count) { return hipCUDAErrorTohipError(cudaMemset(devPtr, value, count)); } -inline static hipError_t hipMemsetAsync(void* devPtr,int value, size_t count, hipStream stream = 0) { +inline static hipError_t hipMemsetAsync(void* devPtr,int value, size_t count, hipStream_t stream = 0) { return hipCUDAErrorTohipError(cudaMemsetAsync(devPtr, value, count, stream)); } @@ -338,7 +338,7 @@ inline static hipError_t hipGetDeviceProperties(hipDeviceProp_t *p_prop, int dev cudaDeviceProp cdprop; cudaError_t cerror; cerror = cudaGetDeviceProperties(&cdprop,device); - strcpy(p_prop->name,cdprop.name); + strncpy(p_prop->name,cdprop.name, 256); p_prop->totalGlobalMem = cdprop.totalGlobalMem ; p_prop->sharedMemPerBlock = cdprop.sharedMemPerBlock; p_prop->regsPerBlock = cdprop.regsPerBlock; From 46feb7dcf298c42861a11e4cc67a99369749d51e Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:17:18 +0530 Subject: [PATCH 08/30] Move include/* to include/hip/* Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54 [ROCm/clr commit: bbfc08f41973ee482b0f2bc2882e4c85d13eec2e] --- projects/clr/hipamd/CMakeLists.txt | 2 +- projects/clr/hipamd/include/hip | 1 - projects/clr/hipamd/include/{ => hip}/hcc.h | 2 +- .../include/{ => hip}/hcc_detail/cuda/cuda.h | 0 .../{ => hip}/hcc_detail/cuda/math_functions.h | 0 .../hipamd/include/{ => hip}/hcc_detail/hcc_acc.h | 0 .../include/{ => hip}/hcc_detail/hipComplex.h | 0 .../hipamd/include/{ => hip}/hcc_detail/hip_blas.h | 0 .../hipamd/include/{ => hip}/hcc_detail/hip_fp16.h | 2 +- .../hipamd/include/{ => hip}/hcc_detail/hip_hcc.h | 0 .../hipamd/include/{ => hip}/hcc_detail/hip_ldg.h | 6 ++---- .../include/{ => hip}/hcc_detail/hip_runtime.h | 0 .../include/{ => hip}/hcc_detail/hip_runtime_api.h | 0 .../include/{ => hip}/hcc_detail/hip_texture.h | 0 .../hipamd/include/{ => hip}/hcc_detail/hip_util.h | 0 .../{ => hip}/hcc_detail/hip_vector_types.h | 0 .../include/{ => hip}/hcc_detail/host_defines.h | 0 .../include/{ => hip}/hcc_detail/trace_helper.h | 0 projects/clr/hipamd/include/{ => hip}/hipComplex.h | 0 projects/clr/hipamd/include/{ => hip}/hip_common.h | 0 projects/clr/hipamd/include/{ => hip}/hip_fp16.h | 0 .../clr/hipamd/include/{ => hip}/hip_runtime.h | 0 .../clr/hipamd/include/{ => hip}/hip_runtime_api.h | 0 .../hipamd/include/{ => hip}/hip_vector_types.h | 0 projects/clr/hipamd/include/{ => hip}/hipblas.h | 0 .../include/{ => hip}/nvcc_detail/hipComplex.h | 0 .../include/{ => hip}/nvcc_detail/hip_blas.h | 0 .../include/{ => hip}/nvcc_detail/hip_runtime.h | 0 .../{ => hip}/nvcc_detail/hip_runtime_api.h | 0 projects/clr/hipamd/src/device_util.cpp | 9 +++++---- projects/clr/hipamd/src/hip_context.cpp | 6 +++--- projects/clr/hipamd/src/hip_device.cpp | 6 +++--- projects/clr/hipamd/src/hip_error.cpp | 6 +++--- projects/clr/hipamd/src/hip_event.cpp | 6 +++--- projects/clr/hipamd/src/hip_hcc.cpp | 12 ++++++------ projects/clr/hipamd/src/hip_ldg.cpp | 3 ++- projects/clr/hipamd/src/hip_memory.cpp | 12 +++++++----- projects/clr/hipamd/src/hip_module.cpp | 14 ++++++++------ projects/clr/hipamd/src/hip_peer.cpp | 6 +++--- projects/clr/hipamd/src/hip_stream.cpp | 6 +++--- 40 files changed, 51 insertions(+), 48 deletions(-) delete mode 120000 projects/clr/hipamd/include/hip rename projects/clr/hipamd/include/{ => hip}/hcc.h (76%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/cuda/cuda.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/cuda/math_functions.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hcc_acc.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hipComplex.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_blas.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_fp16.h (99%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_hcc.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_ldg.h (95%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_runtime.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_runtime_api.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_texture.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_util.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/hip_vector_types.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/host_defines.h (100%) rename projects/clr/hipamd/include/{ => hip}/hcc_detail/trace_helper.h (100%) rename projects/clr/hipamd/include/{ => hip}/hipComplex.h (100%) rename projects/clr/hipamd/include/{ => hip}/hip_common.h (100%) rename projects/clr/hipamd/include/{ => hip}/hip_fp16.h (100%) rename projects/clr/hipamd/include/{ => hip}/hip_runtime.h (100%) rename projects/clr/hipamd/include/{ => hip}/hip_runtime_api.h (100%) rename projects/clr/hipamd/include/{ => hip}/hip_vector_types.h (100%) rename projects/clr/hipamd/include/{ => hip}/hipblas.h (100%) rename projects/clr/hipamd/include/{ => hip}/nvcc_detail/hipComplex.h (100%) rename projects/clr/hipamd/include/{ => hip}/nvcc_detail/hip_blas.h (100%) rename projects/clr/hipamd/include/{ => hip}/nvcc_detail/hip_runtime.h (100%) rename projects/clr/hipamd/include/{ => hip}/nvcc_detail/hip_runtime_api.h (100%) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index 5bdba928ae..e1ce5ef9ae 100644 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -166,7 +166,7 @@ if(HIP_PLATFORM STREQUAL "hcc") set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_PATCH}") # Add remaining flags - set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC -hc -I${HCC_HOME}/include -I${HSA_PATH}/include -I/opt/rocm/libhsakmt/include/libhsakmt -stdlib=libc++") + set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC -hc -I${HCC_HOME}/include -I${HSA_PATH}/include -I/opt/rocm/libhsakmt/include -stdlib=libc++") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HCC_HOME}/bin/hcc") diff --git a/projects/clr/hipamd/include/hip b/projects/clr/hipamd/include/hip deleted file mode 120000 index f5030fe889..0000000000 --- a/projects/clr/hipamd/include/hip +++ /dev/null @@ -1 +0,0 @@ -../include \ No newline at end of file diff --git a/projects/clr/hipamd/include/hcc.h b/projects/clr/hipamd/include/hip/hcc.h similarity index 76% rename from projects/clr/hipamd/include/hcc.h rename to projects/clr/hipamd/include/hip/hcc.h index 9766e95935..efb5197cca 100644 --- a/projects/clr/hipamd/include/hcc.h +++ b/projects/clr/hipamd/include/hip/hcc.h @@ -2,7 +2,7 @@ #define HCC_H #if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__) -#include +#include "hip/hcc_detail/hcc_acc.h" #endif #endif diff --git a/projects/clr/hipamd/include/hcc_detail/cuda/cuda.h b/projects/clr/hipamd/include/hip/hcc_detail/cuda/cuda.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/cuda/cuda.h rename to projects/clr/hipamd/include/hip/hcc_detail/cuda/cuda.h diff --git a/projects/clr/hipamd/include/hcc_detail/cuda/math_functions.h b/projects/clr/hipamd/include/hip/hcc_detail/cuda/math_functions.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/cuda/math_functions.h rename to projects/clr/hipamd/include/hip/hcc_detail/cuda/math_functions.h diff --git a/projects/clr/hipamd/include/hcc_detail/hcc_acc.h b/projects/clr/hipamd/include/hip/hcc_detail/hcc_acc.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hcc_acc.h rename to projects/clr/hipamd/include/hip/hcc_detail/hcc_acc.h diff --git a/projects/clr/hipamd/include/hcc_detail/hipComplex.h b/projects/clr/hipamd/include/hip/hcc_detail/hipComplex.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hipComplex.h rename to projects/clr/hipamd/include/hip/hcc_detail/hipComplex.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_blas.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_blas.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_blas.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_blas.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_fp16.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h similarity index 99% rename from projects/clr/hipamd/include/hcc_detail/hip_fp16.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h index f6d3f2311a..9c7b3a6646 100644 --- a/projects/clr/hipamd/include/hcc_detail/hip_fp16.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h @@ -20,7 +20,7 @@ THE SOFTWARE. #ifndef HIP_FP16_H #define HIP_FP16_H -#include "hip_runtime.h" +#include "hip/hip_runtime.h" typedef struct{ unsigned x: 16; diff --git a/projects/clr/hipamd/include/hcc_detail/hip_hcc.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_hcc.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_hcc.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_hcc.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_ldg.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_ldg.h similarity index 95% rename from projects/clr/hipamd/include/hcc_detail/hip_ldg.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_ldg.h index 8d16ee27ef..6fcb9d9df4 100644 --- a/projects/clr/hipamd/include/hcc_detail/hip_ldg.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_ldg.h @@ -21,11 +21,9 @@ THE SOFTWARE. #define HIP_LDG_H #if __HCC__ -#include"hip_vector_types.h" -#include"host_defines.h" #if __hcc_workweek__ >= 16164 -#include"hip/hip_vector_types.h" -#include"hip/hcc_detail/host_defines.h" +#include "hip/hip_vector_types.h" +#include "hip/hcc_detail/host_defines.h" __device__ char __ldg(const char* ); diff --git a/projects/clr/hipamd/include/hcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_runtime.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_runtime_api.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime_api.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_runtime_api.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_runtime_api.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_texture.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_texture.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_texture.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_texture.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_util.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_util.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_util.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_util.h diff --git a/projects/clr/hipamd/include/hcc_detail/hip_vector_types.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_vector_types.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/hip_vector_types.h rename to projects/clr/hipamd/include/hip/hcc_detail/hip_vector_types.h diff --git a/projects/clr/hipamd/include/hcc_detail/host_defines.h b/projects/clr/hipamd/include/hip/hcc_detail/host_defines.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/host_defines.h rename to projects/clr/hipamd/include/hip/hcc_detail/host_defines.h diff --git a/projects/clr/hipamd/include/hcc_detail/trace_helper.h b/projects/clr/hipamd/include/hip/hcc_detail/trace_helper.h similarity index 100% rename from projects/clr/hipamd/include/hcc_detail/trace_helper.h rename to projects/clr/hipamd/include/hip/hcc_detail/trace_helper.h diff --git a/projects/clr/hipamd/include/hipComplex.h b/projects/clr/hipamd/include/hip/hipComplex.h similarity index 100% rename from projects/clr/hipamd/include/hipComplex.h rename to projects/clr/hipamd/include/hip/hipComplex.h diff --git a/projects/clr/hipamd/include/hip_common.h b/projects/clr/hipamd/include/hip/hip_common.h similarity index 100% rename from projects/clr/hipamd/include/hip_common.h rename to projects/clr/hipamd/include/hip/hip_common.h diff --git a/projects/clr/hipamd/include/hip_fp16.h b/projects/clr/hipamd/include/hip/hip_fp16.h similarity index 100% rename from projects/clr/hipamd/include/hip_fp16.h rename to projects/clr/hipamd/include/hip/hip_fp16.h diff --git a/projects/clr/hipamd/include/hip_runtime.h b/projects/clr/hipamd/include/hip/hip_runtime.h similarity index 100% rename from projects/clr/hipamd/include/hip_runtime.h rename to projects/clr/hipamd/include/hip/hip_runtime.h diff --git a/projects/clr/hipamd/include/hip_runtime_api.h b/projects/clr/hipamd/include/hip/hip_runtime_api.h similarity index 100% rename from projects/clr/hipamd/include/hip_runtime_api.h rename to projects/clr/hipamd/include/hip/hip_runtime_api.h diff --git a/projects/clr/hipamd/include/hip_vector_types.h b/projects/clr/hipamd/include/hip/hip_vector_types.h similarity index 100% rename from projects/clr/hipamd/include/hip_vector_types.h rename to projects/clr/hipamd/include/hip/hip_vector_types.h diff --git a/projects/clr/hipamd/include/hipblas.h b/projects/clr/hipamd/include/hip/hipblas.h similarity index 100% rename from projects/clr/hipamd/include/hipblas.h rename to projects/clr/hipamd/include/hip/hipblas.h diff --git a/projects/clr/hipamd/include/nvcc_detail/hipComplex.h b/projects/clr/hipamd/include/hip/nvcc_detail/hipComplex.h similarity index 100% rename from projects/clr/hipamd/include/nvcc_detail/hipComplex.h rename to projects/clr/hipamd/include/hip/nvcc_detail/hipComplex.h diff --git a/projects/clr/hipamd/include/nvcc_detail/hip_blas.h b/projects/clr/hipamd/include/hip/nvcc_detail/hip_blas.h similarity index 100% rename from projects/clr/hipamd/include/nvcc_detail/hip_blas.h rename to projects/clr/hipamd/include/hip/nvcc_detail/hip_blas.h diff --git a/projects/clr/hipamd/include/nvcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime.h similarity index 100% rename from projects/clr/hipamd/include/nvcc_detail/hip_runtime.h rename to projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime.h diff --git a/projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h b/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h similarity index 100% rename from projects/clr/hipamd/include/nvcc_detail/hip_runtime_api.h rename to projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h diff --git a/projects/clr/hipamd/src/device_util.cpp b/projects/clr/hipamd/src/device_util.cpp index bc3677a846..21a58d7070 100644 --- a/projects/clr/hipamd/src/device_util.cpp +++ b/projects/clr/hipamd/src/device_util.cpp @@ -17,11 +17,12 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include"hip_runtime.h" -#include -#include - +#include +#include #include + +#include "hip/hip_runtime.h" + // TODO: Choose whether default is precise math or fast math based on compilation flag. #ifdef __HCC_ACCELERATOR__ using namespace hc::precise_math; diff --git a/projects/clr/hipamd/src/hip_context.cpp b/projects/clr/hipamd/src/hip_context.cpp index d0ee129358..d2199ec11f 100644 --- a/projects/clr/hipamd/src/hip_context.cpp +++ b/projects/clr/hipamd/src/hip_context.cpp @@ -22,9 +22,9 @@ THE SOFTWARE. #include -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" // Stack of contexts thread_local std::stack tls_ctxStack; diff --git a/projects/clr/hipamd/src/hip_device.cpp b/projects/clr/hipamd/src/hip_device.cpp index ef498acfcd..a677402b69 100644 --- a/projects/clr/hipamd/src/hip_device.cpp +++ b/projects/clr/hipamd/src/hip_device.cpp @@ -17,9 +17,9 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" //------------------------------------------------------------------------------------------------- //Devices diff --git a/projects/clr/hipamd/src/hip_error.cpp b/projects/clr/hipamd/src/hip_error.cpp index 97fcaaf714..840362f314 100644 --- a/projects/clr/hipamd/src/hip_error.cpp +++ b/projects/clr/hipamd/src/hip_error.cpp @@ -17,9 +17,9 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- diff --git a/projects/clr/hipamd/src/hip_event.cpp b/projects/clr/hipamd/src/hip_event.cpp index 52b25fc19b..084625b41d 100644 --- a/projects/clr/hipamd/src/hip_event.cpp +++ b/projects/clr/hipamd/src/hip_event.cpp @@ -17,9 +17,9 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- diff --git a/projects/clr/hipamd/src/hip_hcc.cpp b/projects/clr/hipamd/src/hip_hcc.cpp index 3c8dfb1f3e..f76c454e2e 100644 --- a/projects/clr/hipamd/src/hip_hcc.cpp +++ b/projects/clr/hipamd/src/hip_hcc.cpp @@ -36,15 +36,15 @@ THE SOFTWARE. #include #include #include + #include #include +#include "hsa/hsa_ext_amd.h" +#include "libhsakmt/hsakmt.h" -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hsa_ext_amd.h" -#include "hsakmt.h" - -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" diff --git a/projects/clr/hipamd/src/hip_ldg.cpp b/projects/clr/hipamd/src/hip_ldg.cpp index 620ff91076..c59bd6e66b 100644 --- a/projects/clr/hipamd/src/hip_ldg.cpp +++ b/projects/clr/hipamd/src/hip_ldg.cpp @@ -18,7 +18,8 @@ THE SOFTWARE. */ #include -#include"hcc_detail/hip_ldg.h" + +#include "hip/hcc_detail/hip_ldg.h" __device__ char __ldg(const char* ptr) { diff --git a/projects/clr/hipamd/src/hip_memory.cpp b/projects/clr/hipamd/src/hip_memory.cpp index 68811be8ee..6a869269d3 100644 --- a/projects/clr/hipamd/src/hip_memory.cpp +++ b/projects/clr/hipamd/src/hip_memory.cpp @@ -17,12 +17,14 @@ THE SOFTWARE. */ -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" -#include #include -#include +#include "hsa/hsa.h" +#include "hsa/hsa_ext_amd.h" + +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" + //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- // Memory diff --git a/projects/clr/hipamd/src/hip_module.cpp b/projects/clr/hipamd/src/hip_module.cpp index 7ef3ca9933..f556c85456 100644 --- a/projects/clr/hipamd/src/hip_module.cpp +++ b/projects/clr/hipamd/src/hip_module.cpp @@ -17,17 +17,19 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip_runtime.h" -#include "hsa/hsa.h" -#include "hsa/hsa_ext_amd.h" -#include "hsa/amd_hsa_kernel_code.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" #include #include #include #include +#include "hsa/hsa.h" +#include "hsa/hsa_ext_amd.h" +#include "hsa/amd_hsa_kernel_code.h" + +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" + //TODO Use Pool APIs from HCC to get memory regions. namespace hipdrv { diff --git a/projects/clr/hipamd/src/hip_peer.cpp b/projects/clr/hipamd/src/hip_peer.cpp index 63ac902a23..c0ebda311d 100644 --- a/projects/clr/hipamd/src/hip_peer.cpp +++ b/projects/clr/hipamd/src/hip_peer.cpp @@ -19,9 +19,9 @@ THE SOFTWARE. #include -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" // Peer access functions. diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index 9475e61b21..2b81515784 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -17,9 +17,9 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip_runtime.h" -#include "hcc_detail/hip_hcc.h" -#include "hcc_detail/trace_helper.h" +#include "hip/hip_runtime.h" +#include "hip/hcc_detail/hip_hcc.h" +#include "hip/hcc_detail/trace_helper.h" //------------------------------------------------------------------------------------------------- From ae252a59ef282b173ce003a742b32ad46ea2c51a Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:18:55 +0530 Subject: [PATCH 09/30] Update hipify-clang to generate updated hip_runtime header path Change-Id: I64ceb037f2aa68e4e8d254be7d0bebff83061990 [ROCm/clr commit: 75b2ff1c3f0f0468c2da0dfa47fd9d4dc8172648] --- projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp b/projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp index 885626f0b4..789014ffc9 100644 --- a/projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp +++ b/projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp @@ -107,9 +107,9 @@ struct cuda2hipMap { cuda2hipRename["__CUDACC__"] = {"__HIPCC__", CONV_DEF, API_RUNTIME}; // CUDA includes - cuda2hipRename["cuda.h"] = {"hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}; - cuda2hipRename["cuda_runtime.h"] = {"hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}; - cuda2hipRename["cuda_runtime_api.h"] = {"hip_runtime_api.h", CONV_INCLUDE, API_RUNTIME}; + cuda2hipRename["cuda.h"] = {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}; + cuda2hipRename["cuda_runtime.h"] = {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}; + cuda2hipRename["cuda_runtime_api.h"] = {"hip/hip_runtime_api.h", CONV_INCLUDE, API_RUNTIME}; // HIP includes // TODO: uncomment this when hip/cudacommon.h will be renamed to hip/hipcommon.h @@ -1939,7 +1939,7 @@ public: } while (false); if (PP->countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && Replace->size() > 0) { - StringRef repName = "#include \n"; + StringRef repName = "#include \n"; SourceManager *SM = Result.SourceManager; Replacement Rep(*SM, SM->getLocForStartOfFile(SM->getMainFileID()), 0, repName); Replace->insert(Rep); @@ -1961,7 +1961,7 @@ private: void HipifyPPCallbacks::handleEndSource() { if (Match->countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && Replace->size() > 0) { - StringRef repName = "#include \n"; + StringRef repName = "#include \n"; Replacement Rep(*_sm, _sm->getLocForStartOfFile(_sm->getMainFileID()), 0, repName); Replace->insert(Rep); countReps[CONV_INCLUDE_CUDA_MAIN_H]++; From 9811be47227d3cd00b3fc9649e1adc1b1d4f4fae Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:19:52 +0530 Subject: [PATCH 10/30] hip_base package: Updated to handle updated hip include path Change-Id: I936516874cef4ab551d613303fde32ffe2c6c805 [ROCm/clr commit: 57715b967f9b433037ebd9ea8752bfb589b248ef] --- projects/clr/hipamd/packaging/hip_base.postinst | 5 +---- projects/clr/hipamd/packaging/hip_base.prerm | 3 --- projects/clr/hipamd/packaging/hip_base.txt | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/projects/clr/hipamd/packaging/hip_base.postinst b/projects/clr/hipamd/packaging/hip_base.postinst index bdd5507374..daf0591081 100755 --- a/projects/clr/hipamd/packaging/hip_base.postinst +++ b/projects/clr/hipamd/packaging/hip_base.postinst @@ -22,12 +22,9 @@ done popd >/dev/null # Soft-link to headers -HIPINCDIR=$HIPDIR/include +HIPINCDIR=$HIPDIR/include/hip ROCMINCDIR=$ROCMDIR/include mkdir -p $ROCMINCDIR pushd $ROCMINCDIR ln -s $HIPINCDIR hip popd -pushd $HIPINCDIR -ln -s $HIPINCDIR hip -popd diff --git a/projects/clr/hipamd/packaging/hip_base.prerm b/projects/clr/hipamd/packaging/hip_base.prerm index e27cbdd2e6..2953e16f2f 100755 --- a/projects/clr/hipamd/packaging/hip_base.prerm +++ b/projects/clr/hipamd/packaging/hip_base.prerm @@ -28,8 +28,5 @@ ROCMINCDIR=$ROCMDIR/include pushd $ROCMINCDIR rm hip popd -pushd $HIPINCDIR -rm hip -popd rmdir --ignore-fail-on-non-empty $ROCMINCDIR diff --git a/projects/clr/hipamd/packaging/hip_base.txt b/projects/clr/hipamd/packaging/hip_base.txt index e528e688ef..6f989d5636 100644 --- a/projects/clr/hipamd/packaging/hip_base.txt +++ b/projects/clr/hipamd/packaging/hip_base.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3) project(hip_base) install(DIRECTORY @hip_SOURCE_DIR@/bin DESTINATION . USE_SOURCE_PERMISSIONS) -install(DIRECTORY @hip_SOURCE_DIR@/include DESTINATION . PATTERN "hip" EXCLUDE) +install(DIRECTORY @hip_SOURCE_DIR@/include DESTINATION .) install(FILES @PROJECT_BINARY_DIR@/.version DESTINATION bin) install(DIRECTORY @hip_SOURCE_DIR@/cmake DESTINATION .) From 43d07079e9c5a5dfff7a7860a0408df094daaa1f Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:20:50 +0530 Subject: [PATCH 11/30] directed tests: Updated to use new hip include path Change-Id: Iab1aee638b7158eb9674a19625dedf6471947e51 [ROCm/clr commit: 59478782473a6f18ba70a7486dc87d7d9c8c1c43] --- .../src/Functional/Negative/Device/hipDeviceGetAttribute.cpp | 4 ++-- .../tests/src/Functional/Negative/Device/hipDeviceUtil.h | 2 +- .../tests/src/Functional/Negative/Device/hipGetDevice.cpp | 4 ++-- .../src/Functional/Negative/Device/hipGetDeviceCount.cpp | 4 ++-- .../src/Functional/Negative/Device/hipGetDeviceProperties.cpp | 4 ++-- .../tests/src/Functional/Negative/Device/hipSetDevice.cpp | 4 ++-- projects/clr/hipamd/tests/src/context/hipCtx_simple.cpp | 2 +- .../tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp | 2 +- .../tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp | 2 +- .../hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp | 2 +- .../clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hipMathFunctions.cpp | 2 +- .../clr/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp | 2 +- .../tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp | 2 +- .../tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp | 2 +- .../hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hipTestDevice.cpp | 4 ++-- .../clr/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp | 4 ++-- projects/clr/hipamd/tests/src/deviceLib/hip_anyall.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hip_ballot.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hip_brev.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hip_clz.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hip_ffs.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hip_popc.cpp | 2 +- projects/clr/hipamd/tests/src/deviceLib/hip_test_ldg.cpp | 2 +- .../clr/hipamd/tests/src/deviceLib/hip_test_make_type.cpp | 2 +- projects/clr/hipamd/tests/src/experimental/xcompile/gApi.c | 2 +- projects/clr/hipamd/tests/src/experimental/xcompile/gHipApi.c | 2 +- .../clr/hipamd/tests/src/experimental/xcompile/gxxApi.cpp | 2 +- .../clr/hipamd/tests/src/experimental/xcompile/gxxApi1.cpp | 2 +- .../clr/hipamd/tests/src/experimental/xcompile/gxxHipApi.h | 2 +- projects/clr/hipamd/tests/src/experimental/xcompile/hHip.c | 2 +- .../clr/hipamd/tests/src/experimental/xcompile/hipxxKer.cpp | 4 ++-- .../clr/hipamd/tests/src/experimental/xcompile/hxxHip.cpp | 2 +- .../clr/hipamd/tests/src/experimental/xcompile/hxxHipApi.cpp | 2 +- projects/clr/hipamd/tests/src/hipArray.cpp | 2 +- projects/clr/hipamd/tests/src/hipC.c | 2 +- projects/clr/hipamd/tests/src/hipC.cpp | 2 +- projects/clr/hipamd/tests/src/hipCKernel.c | 4 ++-- projects/clr/hipamd/tests/src/hipChooseDevice.cpp | 2 +- projects/clr/hipamd/tests/src/hipComplex.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipDeviceMemcpy.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipDrvMemcpy.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipDynamicShared.cpp | 2 +- projects/clr/hipamd/tests/src/hipEnvVar.cpp | 2 +- projects/clr/hipamd/tests/src/hipEnvVarDriver.cpp | 2 +- projects/clr/hipamd/tests/src/hipEventRecord.cpp | 2 +- projects/clr/hipamd/tests/src/hipGetDeviceAttribute.cpp | 2 +- projects/clr/hipamd/tests/src/hipHcc.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipLaunchParm.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipModule.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipModuleUnload.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipPeerToPeer_simple.cpp | 2 +- projects/clr/hipamd/tests/src/hipPointerAttrib.cpp | 2 +- projects/clr/hipamd/tests/src/hipRandomMemcpyAsync.cpp | 2 +- projects/clr/hipamd/tests/src/hipTestHalf.cpp | 2 +- projects/clr/hipamd/tests/src/hipTestHost.cpp | 4 ++-- projects/clr/hipamd/tests/src/hipTestMemcpyPin.cpp | 2 +- projects/clr/hipamd/tests/src/kernel/hipGridLaunch.cpp | 2 +- .../clr/hipamd/tests/src/kernel/hipLanguageExtensions.cpp | 2 +- projects/clr/hipamd/tests/src/kernel/launch_bounds.cpp | 2 +- projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp | 4 ++-- .../clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAll.cpp | 2 +- .../clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp | 2 +- .../hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp | 2 +- projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp | 2 +- .../tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp | 2 +- .../src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp | 2 +- projects/clr/hipamd/tests/src/runtimeApi/stream/hipStream.h | 2 +- .../hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp | 2 +- projects/clr/hipamd/tests/src/sampleModule.cpp | 4 ++-- projects/clr/hipamd/tests/src/stress/hipStressAsync.cpp | 2 +- projects/clr/hipamd/tests/src/stress/hipStressChain.cpp | 2 +- projects/clr/hipamd/tests/src/stress/hipStressKernel.cpp | 2 +- projects/clr/hipamd/tests/src/stress/hipStressMemcpy.cpp | 2 +- projects/clr/hipamd/tests/src/stress/hipStressSync.cpp | 2 +- projects/clr/hipamd/tests/src/test_common.h | 2 +- 77 files changed, 96 insertions(+), 96 deletions(-) diff --git a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceGetAttribute.cpp b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceGetAttribute.cpp index 53aa812e06..b901f660ca 100644 --- a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceGetAttribute.cpp +++ b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceGetAttribute.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include"hipDeviceUtil.h" int main() diff --git a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceUtil.h b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceUtil.h index 392aa8c277..5b82886d9f 100644 --- a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceUtil.h +++ b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipDeviceUtil.h @@ -1,7 +1,7 @@ #ifndef HIPDEVICEUTIL_H #define HIPDEVICEUTIL_H -#include +#include "hip/hip_runtime_api.h" #include #define HIP_CHECK(status, func) \ diff --git a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDevice.cpp b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDevice.cpp index 5d7ffe0d92..0dd6945e17 100644 --- a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDevice.cpp +++ b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDevice.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include"hipDeviceUtil.h" int main() diff --git a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceCount.cpp b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceCount.cpp index c9f8ed3864..2766c7bc1c 100644 --- a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceCount.cpp +++ b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceCount.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include"hipDeviceUtil.h" int main() diff --git a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceProperties.cpp b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceProperties.cpp index 964df95d20..1989beca4f 100644 --- a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceProperties.cpp +++ b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipGetDeviceProperties.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include"hipDeviceUtil.h" int main() diff --git a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipSetDevice.cpp b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipSetDevice.cpp index 4269627ad5..6b7b24a3cc 100644 --- a/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipSetDevice.cpp +++ b/projects/clr/hipamd/tests/src/Functional/Negative/Device/hipSetDevice.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include"hipDeviceUtil.h" int main() diff --git a/projects/clr/hipamd/tests/src/context/hipCtx_simple.cpp b/projects/clr/hipamd/tests/src/context/hipCtx_simple.cpp index 18174065d6..086cc77549 100644 --- a/projects/clr/hipamd/tests/src/context/hipCtx_simple.cpp +++ b/projects/clr/hipamd/tests/src/context/hipCtx_simple.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" int main(int argc, char *argv[]) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp index ad344aedfd..0dab2d7106 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp index 40343053f5..996577e840 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp index 00815768ea..9980dad277 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp index 2f5f474161..250dc1d949 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipMathFunctions.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipMathFunctions.cpp index e3fb8bdd35..ed62120613 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipMathFunctions.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipMathFunctions.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" int main(int argc, char *argv[]) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp index f72e4e995a..74db5d0f73 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. // Includes HIP Runtime -#include +#include "hip/hip_runtime.h" #include #define EXIT_WAIVED 2 diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp index 635e4e8e65..caddcc0149 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp index 6aa0171ac9..a8c1194aab 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp index 51f09a9c0b..36aa852d81 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp @@ -19,7 +19,7 @@ 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. */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #pragma GCC diagnostic ignored "-Wall" diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipTestDevice.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipTestDevice.cpp index 186d7cec6a..9d90eb7de0 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipTestDevice.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipTestDevice.cpp @@ -24,8 +24,8 @@ THE SOFTWARE. */ #include"test_common.h" -#include"hip_runtime.h" -#include"hip_runtime_api.h" +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #define N 512 #define SIZE N*sizeof(float) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp index 12be3e96ba..c401a44cbd 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp @@ -24,8 +24,8 @@ THE SOFTWARE. */ #include"test_common.h" -#include"hip_runtime.h" -#include"hip_runtime_api.h" +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #define N 512 #define SIZE N*sizeof(double) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_anyall.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_anyall.cpp index b23360ac92..aa025dad43 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_anyall.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_anyall.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. #include #include -#include +#include "hip/hip_runtime.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) __global__ void diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_ballot.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_ballot.cpp index 6bbe5d8adb..d6df069351 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_ballot.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_ballot.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include -#include +#include "hip/hip_runtime.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) __global__ void diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_brev.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_brev.cpp index 5f745035d0..983b44047b 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_brev.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_brev.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_clz.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_clz.cpp index c8ac5fc3c6..5c60b29a2d 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_clz.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_clz.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) #define WIDTH 8 diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_ffs.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_ffs.cpp index cc60c0cca2..dfdc439a21 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_ffs.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_ffs.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_popc.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_popc.cpp index cfa13621a2..b40bbd2000 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_popc.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_popc.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_test_ldg.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_test_ldg.cpp index af6423f464..0737533175 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_test_ldg.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_test_ldg.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #if (__hcc_workweek__ >= 16164) || defined (__HIP_PLATFORM_NVCC__) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hip_test_make_type.cpp b/projects/clr/hipamd/tests/src/deviceLib/hip_test_make_type.cpp index dec87ec712..ef493ac923 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hip_test_make_type.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hip_test_make_type.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #define HIP_ASSERT(x) (assert((x)==hipSuccess)) diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/gApi.c b/projects/clr/hipamd/tests/src/experimental/xcompile/gApi.c index cbe0f2a7d8..ed2694176d 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/gApi.c +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/gApi.c @@ -21,7 +21,7 @@ THE SOFTWARE. */ -#include"hip_runtime_api.h" +#include "hip/hip_runtime_api.h" #define size 1024*1024 diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/gHipApi.c b/projects/clr/hipamd/tests/src/experimental/xcompile/gHipApi.c index 366ee1a30c..8608b02273 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/gHipApi.c +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/gHipApi.c @@ -22,7 +22,7 @@ THE SOFTWARE. #include"gHipApi.h" -#include"hip_runtime_api.h" +#include "hip/hip_runtime_api.h" #include"stdio.h" void _h2d(mem_manager *self){ diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi.cpp b/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi.cpp index 65ef176faf..966ac679b3 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi.cpp +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi.cpp @@ -21,7 +21,7 @@ THE SOFTWARE. */ -#include"hip_runtime_api.h" +#include "hip/hip_runtime_api.h" #include #define size 1024*1024 diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi1.cpp b/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi1.cpp index 85fb44d043..8afd123d5c 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi1.cpp +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/gxxApi1.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include"gxxApi1.h" -#include"hip_runtime_api.h" +#include "hip/hip_runtime_api.h" void* mallocHip(size_t size) { diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/gxxHipApi.h b/projects/clr/hipamd/tests/src/experimental/xcompile/gxxHipApi.h index 0b298ef36a..67e29f84e1 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/gxxHipApi.h +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/gxxHipApi.h @@ -25,7 +25,7 @@ THE SOFTWARE. #define GXXHIPAPI_H #include -#include"hip_runtime_api.h" +#include "hip/hip_runtime_api.h" class memManager{ private: diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/hHip.c b/projects/clr/hipamd/tests/src/experimental/xcompile/hHip.c index 661c0c2e5e..2ac4ebc73e 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/hHip.c +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/hHip.c @@ -22,7 +22,7 @@ THE SOFTWARE. #include "gHipApi.h" -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define LEN 1024*1024 #define SIZE LEN * sizeof(float) diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/hipxxKer.cpp b/projects/clr/hipamd/tests/src/experimental/xcompile/hipxxKer.cpp index ddea7fd542..79a272aaf2 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/hipxxKer.cpp +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/hipxxKer.cpp @@ -21,8 +21,8 @@ THE SOFTWARE. */ -#include"hip_runtime.h" -#include"hip_runtime_api.h" +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include"gxxApi1.h" #define len 1024*1024 diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHip.cpp b/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHip.cpp index 124b733eba..6a748d5c89 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHip.cpp +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHip.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. #include"gxxHipApi.h" #include -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #define LEN 1024*1024 #define SIZE LEN * sizeof(float) diff --git a/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHipApi.cpp b/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHipApi.cpp index 695394e706..263c9fcf48 100644 --- a/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHipApi.cpp +++ b/projects/clr/hipamd/tests/src/experimental/xcompile/hxxHipApi.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. #include"gxxHipApi.h" #include -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #define LEN 1024*1024 #define SIZE LEN * sizeof(float) diff --git a/projects/clr/hipamd/tests/src/hipArray.cpp b/projects/clr/hipamd/tests/src/hipArray.cpp index e32e2c0e5c..9f9875a8d2 100644 --- a/projects/clr/hipamd/tests/src/hipArray.cpp +++ b/projects/clr/hipamd/tests/src/hipArray.cpp @@ -4,7 +4,7 @@ * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" void printSep() diff --git a/projects/clr/hipamd/tests/src/hipC.c b/projects/clr/hipamd/tests/src/hipC.c index afe43735f2..50177ac6c2 100644 --- a/projects/clr/hipamd/tests/src/hipC.c +++ b/projects/clr/hipamd/tests/src/hipC.c @@ -1,4 +1,4 @@ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #define ITER 1<<20 diff --git a/projects/clr/hipamd/tests/src/hipC.cpp b/projects/clr/hipamd/tests/src/hipC.cpp index 73526ecfe0..3380e8abd9 100644 --- a/projects/clr/hipamd/tests/src/hipC.cpp +++ b/projects/clr/hipamd/tests/src/hipC.cpp @@ -1,4 +1,4 @@ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #define ITER 1<<20 diff --git a/projects/clr/hipamd/tests/src/hipCKernel.c b/projects/clr/hipamd/tests/src/hipCKernel.c index 15f12fcadd..19a034d843 100644 --- a/projects/clr/hipamd/tests/src/hipCKernel.c +++ b/projects/clr/hipamd/tests/src/hipCKernel.c @@ -1,5 +1,5 @@ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" __global__ void Kernel(hipLaunchParm lp, float *Ad){ int tx = hipThreadIdx_x + hipBlockIdx_x * hipBlockDim_x; diff --git a/projects/clr/hipamd/tests/src/hipChooseDevice.cpp b/projects/clr/hipamd/tests/src/hipChooseDevice.cpp index b1cd73ee87..4f289b9eb8 100644 --- a/projects/clr/hipamd/tests/src/hipChooseDevice.cpp +++ b/projects/clr/hipamd/tests/src/hipChooseDevice.cpp @@ -1,5 +1,5 @@ #include -#include +#include "hip/hip_runtime.h" int main( void ) { hipDeviceProp_t prop; int dev; diff --git a/projects/clr/hipamd/tests/src/hipComplex.cpp b/projects/clr/hipamd/tests/src/hipComplex.cpp index 2e9c1884a1..ab1e67036a 100644 --- a/projects/clr/hipamd/tests/src/hipComplex.cpp +++ b/projects/clr/hipamd/tests/src/hipComplex.cpp @@ -19,8 +19,8 @@ THE SOFTWARE. #include -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include #define LEN 64 diff --git a/projects/clr/hipamd/tests/src/hipDeviceMemcpy.cpp b/projects/clr/hipamd/tests/src/hipDeviceMemcpy.cpp index 7c1cc59808..54fd02c0c2 100644 --- a/projects/clr/hipamd/tests/src/hipDeviceMemcpy.cpp +++ b/projects/clr/hipamd/tests/src/hipDeviceMemcpy.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #define LEN 1030 #define SIZE LEN << 2 diff --git a/projects/clr/hipamd/tests/src/hipDrvMemcpy.cpp b/projects/clr/hipamd/tests/src/hipDrvMemcpy.cpp index 8322464964..1e3b1df46a 100644 --- a/projects/clr/hipamd/tests/src/hipDrvMemcpy.cpp +++ b/projects/clr/hipamd/tests/src/hipDrvMemcpy.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #define LEN 1024 #define SIZE LEN<<2 diff --git a/projects/clr/hipamd/tests/src/hipDynamicShared.cpp b/projects/clr/hipamd/tests/src/hipDynamicShared.cpp index 2ed793608b..d5aed7b24f 100644 --- a/projects/clr/hipamd/tests/src/hipDynamicShared.cpp +++ b/projects/clr/hipamd/tests/src/hipDynamicShared.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. * HIT_END */ -#include +#include "hip/hip_runtime.h" #include "test_common.h" template diff --git a/projects/clr/hipamd/tests/src/hipEnvVar.cpp b/projects/clr/hipamd/tests/src/hipEnvVar.cpp index babfc73832..d5942518e0 100644 --- a/projects/clr/hipamd/tests/src/hipEnvVar.cpp +++ b/projects/clr/hipamd/tests/src/hipEnvVar.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include #include #include -#include +#include "hip/hip_runtime.h" using namespace std; diff --git a/projects/clr/hipamd/tests/src/hipEnvVarDriver.cpp b/projects/clr/hipamd/tests/src/hipEnvVarDriver.cpp index 7046849525..ea379724d9 100644 --- a/projects/clr/hipamd/tests/src/hipEnvVarDriver.cpp +++ b/projects/clr/hipamd/tests/src/hipEnvVarDriver.cpp @@ -27,7 +27,7 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include -#include +#include "hip/hip_runtime.h" using namespace std; int getDeviceNumber(){ diff --git a/projects/clr/hipamd/tests/src/hipEventRecord.cpp b/projects/clr/hipamd/tests/src/hipEventRecord.cpp index 07b2068fac..f8ef36b0bb 100644 --- a/projects/clr/hipamd/tests/src/hipEventRecord.cpp +++ b/projects/clr/hipamd/tests/src/hipEventRecord.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" int main(int argc, char *argv[]) diff --git a/projects/clr/hipamd/tests/src/hipGetDeviceAttribute.cpp b/projects/clr/hipamd/tests/src/hipGetDeviceAttribute.cpp index f94910459f..a67296476f 100644 --- a/projects/clr/hipamd/tests/src/hipGetDeviceAttribute.cpp +++ b/projects/clr/hipamd/tests/src/hipGetDeviceAttribute.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. #include #include -#include +#include "hip/hip_runtime.h" #include "test_common.h" diff --git a/projects/clr/hipamd/tests/src/hipHcc.cpp b/projects/clr/hipamd/tests/src/hipHcc.cpp index f9bd584faa..1c54103b08 100644 --- a/projects/clr/hipamd/tests/src/hipHcc.cpp +++ b/projects/clr/hipamd/tests/src/hipHcc.cpp @@ -29,8 +29,8 @@ THE SOFTWARE. #include #include -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hcc.h" #include "test_common.h" #define CHECK(error) \ diff --git a/projects/clr/hipamd/tests/src/hipLaunchParm.cpp b/projects/clr/hipamd/tests/src/hipLaunchParm.cpp index 0e8248aebc..5ffb557662 100644 --- a/projects/clr/hipamd/tests/src/hipLaunchParm.cpp +++ b/projects/clr/hipamd/tests/src/hipLaunchParm.cpp @@ -23,9 +23,9 @@ THE SOFTWARE. * HIT_END */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include"test_common.h" -#include"hip_runtime_api.h" +#include "hip/hip_runtime_api.h" #include __global__ void vAdd(hipLaunchParm lp, float *a){} diff --git a/projects/clr/hipamd/tests/src/hipModule.cpp b/projects/clr/hipamd/tests/src/hipModule.cpp index 44855fb74f..d9193cd87f 100644 --- a/projects/clr/hipamd/tests/src/hipModule.cpp +++ b/projects/clr/hipamd/tests/src/hipModule.cpp @@ -17,8 +17,8 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include #include #include diff --git a/projects/clr/hipamd/tests/src/hipModuleUnload.cpp b/projects/clr/hipamd/tests/src/hipModuleUnload.cpp index 2e37414c2c..fa95fbcab5 100644 --- a/projects/clr/hipamd/tests/src/hipModuleUnload.cpp +++ b/projects/clr/hipamd/tests/src/hipModuleUnload.cpp @@ -17,8 +17,8 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include #define fileName "vcpy_isa.co" diff --git a/projects/clr/hipamd/tests/src/hipPeerToPeer_simple.cpp b/projects/clr/hipamd/tests/src/hipPeerToPeer_simple.cpp index 0e99e9bfb8..2c1a3cc339 100644 --- a/projects/clr/hipamd/tests/src/hipPeerToPeer_simple.cpp +++ b/projects/clr/hipamd/tests/src/hipPeerToPeer_simple.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" bool p_memcpyWithPeer = false; // use the peer device for the P2P copy diff --git a/projects/clr/hipamd/tests/src/hipPointerAttrib.cpp b/projects/clr/hipamd/tests/src/hipPointerAttrib.cpp index f0d04f81bf..fb7832d9a6 100644 --- a/projects/clr/hipamd/tests/src/hipPointerAttrib.cpp +++ b/projects/clr/hipamd/tests/src/hipPointerAttrib.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. // Test pointer tracking logic: allocate memory and retrieve stats with hipPointerGetAttributes -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #include diff --git a/projects/clr/hipamd/tests/src/hipRandomMemcpyAsync.cpp b/projects/clr/hipamd/tests/src/hipRandomMemcpyAsync.cpp index b00987b6c3..8a5067ac8d 100644 --- a/projects/clr/hipamd/tests/src/hipRandomMemcpyAsync.cpp +++ b/projects/clr/hipamd/tests/src/hipRandomMemcpyAsync.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #define WIDTH 1024 diff --git a/projects/clr/hipamd/tests/src/hipTestHalf.cpp b/projects/clr/hipamd/tests/src/hipTestHalf.cpp index 249a6cbce2..7455037923 100644 --- a/projects/clr/hipamd/tests/src/hipTestHalf.cpp +++ b/projects/clr/hipamd/tests/src/hipTestHalf.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. #include #include -#include "hip_runtime_api.h" +#include "hip/hip_runtime_api.h" #define DSIZE 4 #define SCF 0.5f diff --git a/projects/clr/hipamd/tests/src/hipTestHost.cpp b/projects/clr/hipamd/tests/src/hipTestHost.cpp index e1207f43e0..7015e46312 100644 --- a/projects/clr/hipamd/tests/src/hipTestHost.cpp +++ b/projects/clr/hipamd/tests/src/hipTestHost.cpp @@ -18,8 +18,8 @@ THE SOFTWARE. */ #include "test_common.h" #include -#include "hip_runtime.h" -#include "hip_runtime_api.h" +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #define N 512 diff --git a/projects/clr/hipamd/tests/src/hipTestMemcpyPin.cpp b/projects/clr/hipamd/tests/src/hipTestMemcpyPin.cpp index 7240a6cf6e..3ac4e09765 100644 --- a/projects/clr/hipamd/tests/src/hipTestMemcpyPin.cpp +++ b/projects/clr/hipamd/tests/src/hipTestMemcpyPin.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. * HIT_END */ -#include +#include "hip/hip_runtime.h" #include"test_common.h" #define len 1024*1024 diff --git a/projects/clr/hipamd/tests/src/kernel/hipGridLaunch.cpp b/projects/clr/hipamd/tests/src/kernel/hipGridLaunch.cpp index 7b8f4f5c3e..99c6a29557 100644 --- a/projects/clr/hipamd/tests/src/kernel/hipGridLaunch.cpp +++ b/projects/clr/hipamd/tests/src/kernel/hipGridLaunch.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" diff --git a/projects/clr/hipamd/tests/src/kernel/hipLanguageExtensions.cpp b/projects/clr/hipamd/tests/src/kernel/hipLanguageExtensions.cpp index 767c74f366..6ad0c382a0 100644 --- a/projects/clr/hipamd/tests/src/kernel/hipLanguageExtensions.cpp +++ b/projects/clr/hipamd/tests/src/kernel/hipLanguageExtensions.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. * HIT_END */ -#include +#include "hip/hip_runtime.h" #include #ifdef __HCC__ diff --git a/projects/clr/hipamd/tests/src/kernel/launch_bounds.cpp b/projects/clr/hipamd/tests/src/kernel/launch_bounds.cpp index e41f782190..2e10a9204a 100644 --- a/projects/clr/hipamd/tests/src/kernel/launch_bounds.cpp +++ b/projects/clr/hipamd/tests/src/kernel/launch_bounds.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. // Test launch bounds and initialization conditions. -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" int p_blockSize = 256; diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp index 659d16c23b..ac01fc4362 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp @@ -28,8 +28,8 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" -#include "hip_runtime.h" +#include "hip/hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAll.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAll.cpp index f8236b568d..387c857622 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAll.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAll.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. * HIT_END */ -#include +#include "hip/hip_runtime.h" #include #include #include"test_common.h" diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp index 94ab7fa73b..22bd30689a 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpyAsync.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. // Test under-development. Calls async mem-copy API, experiment with functionality. -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" unsigned p_streams = 2; diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp index 8164896dbe..316f50c01b 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" bool p_async = false; diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp index a319fb3984..324e588f2f 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp @@ -34,7 +34,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" diff --git a/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp b/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp index 73024a79b5..7c83211f14 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp @@ -6,7 +6,7 @@ * HIT_END */ -#include +#include "hip/hip_runtime_api.h" #include "test_common.h" diff --git a/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp b/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp index 65ccc624cc..3ea3489e20 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. * HIT_END */ -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" void printSep() diff --git a/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStream.h b/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStream.h index 620cfb169e..6468667703 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStream.h +++ b/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStream.h @@ -19,7 +19,7 @@ THE SOFTWARE. #ifndef HIPSTREAM_H #define HIPSTREAM_H -#include +#include "hip/hip_runtime.h" #define NUM_STREAMS 4 diff --git a/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp b/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp index b41a1af4d9..637275c381 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. // Test under-development. Calls async mem-copy API, experiment with functionality. -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #include "test_common.h" #include unsigned p_streams = 6; diff --git a/projects/clr/hipamd/tests/src/sampleModule.cpp b/projects/clr/hipamd/tests/src/sampleModule.cpp index 606b19717d..7ee9147e45 100644 --- a/projects/clr/hipamd/tests/src/sampleModule.cpp +++ b/projects/clr/hipamd/tests/src/sampleModule.cpp @@ -17,8 +17,8 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include #include #include diff --git a/projects/clr/hipamd/tests/src/stress/hipStressAsync.cpp b/projects/clr/hipamd/tests/src/stress/hipStressAsync.cpp index 3b8acb40a6..e06e16809c 100644 --- a/projects/clr/hipamd/tests/src/stress/hipStressAsync.cpp +++ b/projects/clr/hipamd/tests/src/stress/hipStressAsync.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. * hipError_t hipDeviceSynchronize(); */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #define _SIZE sizeof(int)*1024*1024 diff --git a/projects/clr/hipamd/tests/src/stress/hipStressChain.cpp b/projects/clr/hipamd/tests/src/stress/hipStressChain.cpp index 0ed34d1d48..97183a97fa 100644 --- a/projects/clr/hipamd/tests/src/stress/hipStressChain.cpp +++ b/projects/clr/hipamd/tests/src/stress/hipStressChain.cpp @@ -17,7 +17,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #include diff --git a/projects/clr/hipamd/tests/src/stress/hipStressKernel.cpp b/projects/clr/hipamd/tests/src/stress/hipStressKernel.cpp index a6888eb51f..7b5eec5a80 100644 --- a/projects/clr/hipamd/tests/src/stress/hipStressKernel.cpp +++ b/projects/clr/hipamd/tests/src/stress/hipStressKernel.cpp @@ -17,7 +17,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #include diff --git a/projects/clr/hipamd/tests/src/stress/hipStressMemcpy.cpp b/projects/clr/hipamd/tests/src/stress/hipStressMemcpy.cpp index 3473246470..fa67b02ed7 100644 --- a/projects/clr/hipamd/tests/src/stress/hipStressMemcpy.cpp +++ b/projects/clr/hipamd/tests/src/stress/hipStressMemcpy.cpp @@ -17,7 +17,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #include diff --git a/projects/clr/hipamd/tests/src/stress/hipStressSync.cpp b/projects/clr/hipamd/tests/src/stress/hipStressSync.cpp index c325476336..44d004e59b 100644 --- a/projects/clr/hipamd/tests/src/stress/hipStressSync.cpp +++ b/projects/clr/hipamd/tests/src/stress/hipStressSync.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. * hipError_t hipDeviceSynchronize(); */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #define _SIZE sizeof(int)*1024*1024 diff --git a/projects/clr/hipamd/tests/src/test_common.h b/projects/clr/hipamd/tests/src/test_common.h index c50bab233b..2b30b9d48f 100644 --- a/projects/clr/hipamd/tests/src/test_common.h +++ b/projects/clr/hipamd/tests/src/test_common.h @@ -22,7 +22,7 @@ THE SOFTWARE. #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define HC __attribute__((hc)) From 19b9ab32b27f09f84a9074d90f736cdd27c9c931 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:21:10 +0530 Subject: [PATCH 12/30] samples: Updated to use new hip include path Change-Id: I53a1385a17f13a997ea21d14315f15a3ad851dab [ROCm/clr commit: ead394ec0981e471cc4a447d31df8f762c692751] --- .../clr/hipamd/samples/0_Intro/bit_extract/bit_extract.cpp | 2 +- projects/clr/hipamd/samples/0_Intro/hcc_dialects/vadd_hip.cpp | 2 +- projects/clr/hipamd/samples/0_Intro/module_api/runKernel.cpp | 4 ++-- projects/clr/hipamd/samples/0_Intro/square/square.hipref.cpp | 2 +- .../samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp | 2 +- .../samples/1_Utils/hipDispatchLatency/hipDispatchLatency.cpp | 2 +- projects/clr/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp | 2 +- .../samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp | 2 +- .../clr/hipamd/samples/2_Cookbook/1_hipEvent/hipEvent.cpp | 2 +- .../samples/2_Cookbook/2_HIP_ATP_MARKER/MatrixTranspose.cpp | 2 +- .../samples/2_Cookbook/3_shared_memory/sharedMemory.cpp | 2 +- projects/clr/hipamd/samples/2_Cookbook/4_shfl/shfl.cpp | 2 +- projects/clr/hipamd/samples/2_Cookbook/5_2dshfl/2dshfl.cpp | 2 +- .../samples/7_Advanced/hipblas_saxpy/saxpy.hipblasref.cpp | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/projects/clr/hipamd/samples/0_Intro/bit_extract/bit_extract.cpp b/projects/clr/hipamd/samples/0_Intro/bit_extract/bit_extract.cpp index 746e1012bd..06ca349960 100644 --- a/projects/clr/hipamd/samples/0_Intro/bit_extract/bit_extract.cpp +++ b/projects/clr/hipamd/samples/0_Intro/bit_extract/bit_extract.cpp @@ -21,7 +21,7 @@ THE SOFTWARE. */ #include #include -#include +#include "hip/hip_runtime.h" #ifdef __HIP_PLATFORM_HCC__ #include #endif diff --git a/projects/clr/hipamd/samples/0_Intro/hcc_dialects/vadd_hip.cpp b/projects/clr/hipamd/samples/0_Intro/hcc_dialects/vadd_hip.cpp index 9684bef140..c8f425ff90 100644 --- a/projects/clr/hipamd/samples/0_Intro/hcc_dialects/vadd_hip.cpp +++ b/projects/clr/hipamd/samples/0_Intro/hcc_dialects/vadd_hip.cpp @@ -1,4 +1,4 @@ -#include +#include "hip/hip_runtime.h" __global__ void vadd_hip(hipLaunchParm lp, const float *a, const float *b, float *c, int N) { diff --git a/projects/clr/hipamd/samples/0_Intro/module_api/runKernel.cpp b/projects/clr/hipamd/samples/0_Intro/module_api/runKernel.cpp index c6bba63b06..5f16677fc2 100644 --- a/projects/clr/hipamd/samples/0_Intro/module_api/runKernel.cpp +++ b/projects/clr/hipamd/samples/0_Intro/module_api/runKernel.cpp @@ -17,8 +17,8 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include #include #include diff --git a/projects/clr/hipamd/samples/0_Intro/square/square.hipref.cpp b/projects/clr/hipamd/samples/0_Intro/square/square.hipref.cpp index 7ca3a7500d..2955c6ee3b 100644 --- a/projects/clr/hipamd/samples/0_Intro/square/square.hipref.cpp +++ b/projects/clr/hipamd/samples/0_Intro/square/square.hipref.cpp @@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include -#include +#include "hip/hip_runtime.h" #define CHECK(cmd) \ {\ diff --git a/projects/clr/hipamd/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp b/projects/clr/hipamd/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp index a42a561ac7..7cb3e7908e 100644 --- a/projects/clr/hipamd/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp +++ b/projects/clr/hipamd/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include "hip/hip_runtime.h" #include "ResultDatabase.h" diff --git a/projects/clr/hipamd/samples/1_Utils/hipDispatchLatency/hipDispatchLatency.cpp b/projects/clr/hipamd/samples/1_Utils/hipDispatchLatency/hipDispatchLatency.cpp index 65e8603a4e..e686c07683 100644 --- a/projects/clr/hipamd/samples/1_Utils/hipDispatchLatency/hipDispatchLatency.cpp +++ b/projects/clr/hipamd/samples/1_Utils/hipDispatchLatency/hipDispatchLatency.cpp @@ -17,7 +17,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include"hip_runtime.h" +#include "hip/hip_runtime.h" #include #include #include"ResultDatabase.h" diff --git a/projects/clr/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp b/projects/clr/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp index e14006d867..46741a9c91 100644 --- a/projects/clr/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp +++ b/projects/clr/hipamd/samples/1_Utils/hipInfo/hipInfo.cpp @@ -21,7 +21,7 @@ THE SOFTWARE. */ #include #include -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define KNRM "\x1B[0m" #define KRED "\x1B[31m" diff --git a/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp b/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp index c43785f5c9..42445374b0 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp +++ b/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include // hip header file -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define WIDTH 1024 diff --git a/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/hipEvent.cpp b/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/hipEvent.cpp index b6bc4d1db1..76688a7b05 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/hipEvent.cpp +++ b/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/hipEvent.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include // hip header file -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define WIDTH 1024 #define HEIGHT 1024 diff --git a/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/MatrixTranspose.cpp b/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/MatrixTranspose.cpp index b6bc4d1db1..76688a7b05 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/MatrixTranspose.cpp +++ b/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/MatrixTranspose.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include // hip header file -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define WIDTH 1024 #define HEIGHT 1024 diff --git a/projects/clr/hipamd/samples/2_Cookbook/3_shared_memory/sharedMemory.cpp b/projects/clr/hipamd/samples/2_Cookbook/3_shared_memory/sharedMemory.cpp index 1106d454f2..433fada9d2 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/3_shared_memory/sharedMemory.cpp +++ b/projects/clr/hipamd/samples/2_Cookbook/3_shared_memory/sharedMemory.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include // hip header file -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define WIDTH 1024 diff --git a/projects/clr/hipamd/samples/2_Cookbook/4_shfl/shfl.cpp b/projects/clr/hipamd/samples/2_Cookbook/4_shfl/shfl.cpp index f43809b017..2819b1f042 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/4_shfl/shfl.cpp +++ b/projects/clr/hipamd/samples/2_Cookbook/4_shfl/shfl.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include // hip header file -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define WIDTH 4 diff --git a/projects/clr/hipamd/samples/2_Cookbook/5_2dshfl/2dshfl.cpp b/projects/clr/hipamd/samples/2_Cookbook/5_2dshfl/2dshfl.cpp index 85bc3be2ae..783879b054 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/5_2dshfl/2dshfl.cpp +++ b/projects/clr/hipamd/samples/2_Cookbook/5_2dshfl/2dshfl.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. #include // hip header file -#include "hip_runtime.h" +#include "hip/hip_runtime.h" #define WIDTH 4 diff --git a/projects/clr/hipamd/samples/7_Advanced/hipblas_saxpy/saxpy.hipblasref.cpp b/projects/clr/hipamd/samples/7_Advanced/hipblas_saxpy/saxpy.hipblasref.cpp index 3f20c8a7cc..4610a612d4 100644 --- a/projects/clr/hipamd/samples/7_Advanced/hipblas_saxpy/saxpy.hipblasref.cpp +++ b/projects/clr/hipamd/samples/7_Advanced/hipblas_saxpy/saxpy.hipblasref.cpp @@ -5,7 +5,7 @@ #include // header file for the GPU API -#include +#include "hip/hip_runtime.h" #include #define N (1024 * 500) From 71468f6a3222808b1de9fef55efd005b5d50b74b Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:29:40 +0530 Subject: [PATCH 13/30] doxy.cfg: Fixed to use updated include path Change-Id: I21149d3dd3111eaf8c23ff8550a1303d339f5c5d [ROCm/clr commit: e388f775a384f240cb2a4882cdbcab356c6e74e0] --- projects/clr/hipamd/docs/doxygen-input/doxy.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/docs/doxygen-input/doxy.cfg b/projects/clr/hipamd/docs/doxygen-input/doxy.cfg index 11ffaf6861..7b09008937 100755 --- a/projects/clr/hipamd/docs/doxygen-input/doxy.cfg +++ b/projects/clr/hipamd/docs/doxygen-input/doxy.cfg @@ -760,8 +760,8 @@ WARN_LOGFILE = INPUT = $(HIP_PATH)/docs/doxygen-input/mainpage.txt \ $(HIP_PATH)/docs/doxygen-input/sync.txt \ - $(HIP_PATH)/include/ \ - $(HIP_PATH)/include/hcc_detail/ \ + $(HIP_PATH)/include/hip \ + $(HIP_PATH)/include/hip/hcc_detail/ \ $(HIP_PATH)/src/ # This tag can be used to specify the character encoding of the source files From a61eb557ac996a0c373d2b93ef21d1d6b7389f78 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 10:54:42 +0530 Subject: [PATCH 14/30] hipcc: Updated to use new include path Change-Id: I4de6bb6978f2908dbb4d4cfd6e394d21fed90dd5 [ROCm/clr commit: 948d94def805b311e5cd2921243d50a81d27fd78] --- projects/clr/hipamd/bin/hipcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/bin/hipcc b/projects/clr/hipamd/bin/hipcc index 9c174dc5a5..9d70072767 100755 --- a/projects/clr/hipamd/bin/hipcc +++ b/projects/clr/hipamd/bin/hipcc @@ -91,7 +91,7 @@ if ($HIP_PLATFORM eq "hcc") { $HIPCC=$HCC; $HIPCXXFLAGS = $HCCFLAGS; - $HIPCXXFLAGS .= " -I$HIP_PATH/include/hcc_detail/cuda"; + $HIPCXXFLAGS .= " -I$HIP_PATH/include/hip/hcc_detail/cuda"; $HIPCXXFLAGS .= " -I$HSA_PATH/include"; $HIPCXXFLAGS .= " -Wno-deprecated-register"; $HIPLDFLAGS = "-hc -L$HCC_HOME/lib -Wl,--rpath=$HCC_HOME/lib -lc++ -ldl -lpthread -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive"; From ca0322ab2cab1fd35b3fffa3342ccc8a2fa7bb8d Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 13:06:22 +0530 Subject: [PATCH 15/30] clang-hipify -> hipify-clang. Also attempt to build it by default Change-Id: I694e6c772f5347c820d9bd6c9aa61d6d9696911e [ROCm/clr commit: 11fd56ed5d9692ced03cd2dee67e8e0e50942eba] --- projects/clr/hipamd/CMakeLists.txt | 14 ++-- .../clr/hipamd/clang-hipify/CMakeLists.txt | 77 ------------------ .../clr/hipamd/hipify-clang/CMakeLists.txt | 78 +++++++++++++++++++ .../{clang-hipify => hipify-clang}/README.md | 4 +- .../src/Cuda2Hip.cpp | 0 .../{clang-hipify => hipify-clang}/axpy.cu | 0 .../{clang-hipify => hipify-clang}/lit.cfg | 0 .../lit.site.cfg.in | 0 8 files changed, 85 insertions(+), 88 deletions(-) delete mode 100644 projects/clr/hipamd/clang-hipify/CMakeLists.txt create mode 100644 projects/clr/hipamd/hipify-clang/CMakeLists.txt rename projects/clr/hipamd/{clang-hipify => hipify-clang}/README.md (91%) rename projects/clr/hipamd/{clang-hipify => hipify-clang}/src/Cuda2Hip.cpp (100%) rename projects/clr/hipamd/tests/{clang-hipify => hipify-clang}/axpy.cu (100%) rename projects/clr/hipamd/tests/{clang-hipify => hipify-clang}/lit.cfg (100%) rename projects/clr/hipamd/tests/{clang-hipify => hipify-clang}/lit.site.cfg.in (100%) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index e1ce5ef9ae..bbd9b3b6fa 100644 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -123,12 +123,10 @@ if(NOT DEFINED HIP_LIB_TYPE) endif() add_to_config(_buildInfo HIP_LIB_TYPE) -# Check if we need to build clang hipify -if(NOT DEFINED BUILD_CLANG_HIPIFY) - if(NOT DEFINED ENV{BUILD_CLANG_HIPIFY}) - set(BUILD_CLANG_HIPIFY 0) - else() - set(BUILD_CLANG_HIPIFY $ENV{BUILD_CLANG_HIPIFY}) +# Check if we need to build hipify-clang +if(NOT DEFINED HIPIFY_CLANG_LLVM_DIR) + if(DEFINED ENV{HIPIFY_CLANG_LLVM_DIR}) + set(HIPIFY_CLANG_LLVM_DIR $ENV{HIPIFY_CLANG_LLVM_DIR}) endif() endif() @@ -149,9 +147,7 @@ add_to_config(_buildInfo COMPILE_HIP_ATP_MARKER) add_custom_target(update_build_and_version_info ALL COMMAND make rebuild_cache) # Build clang hipify if enabled -if(BUILD_CLANG_HIPIFY) - add_subdirectory(clang-hipify) -endif() +add_subdirectory(hipify-clang) # Build hip_hcc if platform is hcc if(HIP_PLATFORM STREQUAL "hcc") diff --git a/projects/clr/hipamd/clang-hipify/CMakeLists.txt b/projects/clr/hipamd/clang-hipify/CMakeLists.txt deleted file mode 100644 index 71cac2f18c..0000000000 --- a/projects/clr/hipamd/clang-hipify/CMakeLists.txt +++ /dev/null @@ -1,77 +0,0 @@ -cmake_minimum_required(VERSION 2.8.8) -project(hipify-clang) - -# Find LLVM package -find_package(LLVM 3.8 QUIET PATHS ${LLVM_DIR} NO_DEFAULT_PATH) -if (NOT ${LLVM_FOUND}) - message(FATAL_ERROR "Don't know where to find LLVM (v3.8) package. Please specify absolute path using -DLLVM_DIR") -endif() - -list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR}) -include(AddLLVM) - -message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") - -include_directories(${LLVM_INCLUDE_DIRS}) -link_directories(${LLVM_LIBRARY_DIRS}) -add_definitions(${LLVM_DEFINITIONS}) -add_llvm_executable(hipify-clang src/Cuda2Hip.cpp ) -find_program(LIT_COMMAND lit) - -# Link against LLVM and CLANG tools libraries -target_link_libraries(hipify-clang - clangASTMatchers - clangFrontend - clangTooling - clangParse - clangSerialization - clangSema - clangEdit - clangLex - clangAnalysis - clangDriver - clangAST - clangToolingCore - clangRewrite - clangBasic - LLVMProfileData - LLVMSupport - LLVMMCParser - LLVMMC - LLVMBitReader - LLVMOption - LLVMCore) - -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -fno-rtti -fvisibility-inlines-hidden") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHIPIFY_CLANG_RES=\\\"${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}\\\"") - -install(TARGETS hipify-clang - DESTINATION bin) - -# tests -set(Python_ADDITIONAL_VERSIONS 2.7) -include(FindPythonInterp) -if( NOT PYTHONINTERP_FOUND ) - message(FATAL_ERROR - "Unable to find Python interpreter, required for builds and testing\n\n" - "Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") -endif() - -set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) - -configure_file( - ${CMAKE_SOURCE_DIR}/tests/clang-hipify/lit.site.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/tests/clang-hipify/lit.site.cfg - @ONLY) - -add_lit_testsuite(test-hipify "Running HIPify regression tests" - ${CMAKE_SOURCE_DIR}/tests/clang-hipify - PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/tests/clang-hipify/lit.site.cfg - DEPENDS hipify-clang lit - ) - -add_custom_target(test-clang-hipify) -add_dependencies(test-clang-hipify test-hipify) -set_target_properties(test-clang-hipify PROPERTIES FOLDER "Tests") diff --git a/projects/clr/hipamd/hipify-clang/CMakeLists.txt b/projects/clr/hipamd/hipify-clang/CMakeLists.txt new file mode 100644 index 0000000000..6a5f30e2d1 --- /dev/null +++ b/projects/clr/hipamd/hipify-clang/CMakeLists.txt @@ -0,0 +1,78 @@ +cmake_minimum_required(VERSION 2.8.8) +project(hipify-clang) + +# Find LLVM package +find_package(LLVM 3.8 QUIET PATHS ${HIPIFY_CLANG_LLVM_DIR} NO_DEFAULT_PATH) +if (NOT ${LLVM_FOUND}) + message(STATUS "hipify-clang will not be built. To build it please specify absolute path to LLVM (v3.8) package using -DHIPIFY_CLANG_LLVM_DIR") +else() + list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR}) + include(AddLLVM) + + message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") + + include_directories(${LLVM_INCLUDE_DIRS}) + link_directories(${LLVM_LIBRARY_DIRS}) + add_definitions(${LLVM_DEFINITIONS}) + add_llvm_executable(hipify-clang src/Cuda2Hip.cpp) + find_program(LIT_COMMAND lit) + + # Link against LLVM and CLANG tools libraries + target_link_libraries(hipify-clang + clangASTMatchers + clangFrontend + clangTooling + clangParse + clangSerialization + clangSema + clangEdit + clangLex + clangAnalysis + clangDriver + clangAST + clangToolingCore + clangRewrite + clangBasic + LLVMProfileData + LLVMSupport + LLVMMCParser + LLVMMC + LLVMBitReader + LLVMOption + LLVMCore) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -fno-rtti -fvisibility-inlines-hidden") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHIPIFY_CLANG_RES=\\\"${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}\\\"") + + install(TARGETS hipify-clang DESTINATION bin) + + # tests + set(Python_ADDITIONAL_VERSIONS 2.7) + include(FindPythonInterp) + if(NOT PYTHONINTERP_FOUND) + message(FATAL_ERROR + "Unable to find Python interpreter, required for builds and testing\n\n" + "Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") + endif() + + set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) + + configure_file( + ${CMAKE_SOURCE_DIR}/tests/hipify-clang/lit.site.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg + @ONLY) + + add_lit_testsuite(test-hipify "Running HIPify regression tests" + ${CMAKE_SOURCE_DIR}/tests/hipify-clang + PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg + DEPENDS hipify-clang lit + ) + + add_custom_target(test-hipify-clang) + add_dependencies(test-hipify-clang test-hipify) + set_target_properties(test-hipify-clang PROPERTIES FOLDER "Tests") +endif() + +# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/clang-hipify/README.md b/projects/clr/hipamd/hipify-clang/README.md similarity index 91% rename from projects/clr/hipamd/clang-hipify/README.md rename to projects/clr/hipamd/hipify-clang/README.md index f95eed1fc8..6e58f719b7 100644 --- a/projects/clr/hipamd/clang-hipify/README.md +++ b/projects/clr/hipamd/hipify-clang/README.md @@ -25,12 +25,12 @@ tar xvfJ clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz - Enable build of hipify-clang and specify path to LLVM. -Note LLVM_DIR must be a full absolute path to the location extracted above. Here's an example assuming we extract the clang 3.8 package into ~/HIP/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/ +Note HIPIFY_CLANG_LLVM_DIR must be a full absolute path to the location extracted above. Here's an example assuming we extract the clang 3.8 package into ~/HIP/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/ ```shell cd HIP mkdir build cd build -cmake -DBUILD_CLANG_HIPIFY=1 -DLLVM_DIR=~/HIP/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/ -DCMAKE_BUILD_TYPE=Release .. +cmake -DHIPIFY_CLANG_LLVM_DIR=~/HIP/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/ -DCMAKE_BUILD_TYPE=Release .. make make install ``` diff --git a/projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp b/projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp similarity index 100% rename from projects/clr/hipamd/clang-hipify/src/Cuda2Hip.cpp rename to projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp diff --git a/projects/clr/hipamd/tests/clang-hipify/axpy.cu b/projects/clr/hipamd/tests/hipify-clang/axpy.cu similarity index 100% rename from projects/clr/hipamd/tests/clang-hipify/axpy.cu rename to projects/clr/hipamd/tests/hipify-clang/axpy.cu diff --git a/projects/clr/hipamd/tests/clang-hipify/lit.cfg b/projects/clr/hipamd/tests/hipify-clang/lit.cfg similarity index 100% rename from projects/clr/hipamd/tests/clang-hipify/lit.cfg rename to projects/clr/hipamd/tests/hipify-clang/lit.cfg diff --git a/projects/clr/hipamd/tests/clang-hipify/lit.site.cfg.in b/projects/clr/hipamd/tests/hipify-clang/lit.site.cfg.in similarity index 100% rename from projects/clr/hipamd/tests/clang-hipify/lit.site.cfg.in rename to projects/clr/hipamd/tests/hipify-clang/lit.site.cfg.in From d38a5a4404e3c7fd757064fe9d15aa3173afa220 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 22:34:42 +0530 Subject: [PATCH 16/30] Add packaging steps for hipify-clang Change-Id: I0ed916d5fcb4fc4734f1d92e686fc053e4680052 [ROCm/clr commit: 656c1766ea4454e3f8d2a27a131962b5e6e626c7] --- projects/clr/hipamd/CMakeLists.txt | 25 +++++++++++++------ .../clr/hipamd/hipify-clang/CMakeLists.txt | 4 +++ projects/clr/hipamd/packaging/hip_base.txt | 3 +++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index bbd9b3b6fa..8bf1b0c3b8 100644 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -245,13 +245,24 @@ set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_base) configure_file(packaging/hip_base.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) configure_file(packaging/hip_base.postinst ${BUILD_DIR}/postinst @ONLY) configure_file(packaging/hip_base.prerm ${BUILD_DIR}/prerm @ONLY) -add_custom_target(pkg_hip_base COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR}) +if(NOT BUILD_HIPIFY_CLANG) + add_custom_target(pkg_hip_base COMMAND ${CMAKE_COMMAND} . + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR}) +else() + add_custom_target(pkg_hip_base COMMAND ${CMAKE_COMMAND} . + COMMAND rm -rf *.deb *.rpm *.tar.gz + COMMAND make package + COMMAND cp *.deb ${PROJECT_BINARY_DIR} + COMMAND cp *.rpm ${PROJECT_BINARY_DIR} + COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} + WORKING_DIRECTORY ${BUILD_DIR} + DEPENDS hipify-clang) +endif() # Package: hip_hcc set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_hcc) diff --git a/projects/clr/hipamd/hipify-clang/CMakeLists.txt b/projects/clr/hipamd/hipify-clang/CMakeLists.txt index 6a5f30e2d1..14dc9c5d17 100644 --- a/projects/clr/hipamd/hipify-clang/CMakeLists.txt +++ b/projects/clr/hipamd/hipify-clang/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 2.8.8) project(hipify-clang) +set(BUILD_HIPIFY_CLANG 0 PARENT_SCOPE) + # Find LLVM package find_package(LLVM 3.8 QUIET PATHS ${HIPIFY_CLANG_LLVM_DIR} NO_DEFAULT_PATH) if (NOT ${LLVM_FOUND}) @@ -73,6 +75,8 @@ else() add_custom_target(test-hipify-clang) add_dependencies(test-hipify-clang test-hipify) set_target_properties(test-hipify-clang PROPERTIES FOLDER "Tests") + + set(BUILD_HIPIFY_CLANG 1 PARENT_SCOPE) endif() # vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/packaging/hip_base.txt b/projects/clr/hipamd/packaging/hip_base.txt index 6f989d5636..8e02baca9b 100644 --- a/projects/clr/hipamd/packaging/hip_base.txt +++ b/projects/clr/hipamd/packaging/hip_base.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8.3) project(hip_base) install(DIRECTORY @hip_SOURCE_DIR@/bin DESTINATION . USE_SOURCE_PERMISSIONS) +if(@BUILD_HIPIFY_CLANG@) + install(PROGRAMS @PROJECT_BINARY_DIR@/hipify-clang/hipify-clang DESTINATION bin) +endif() install(DIRECTORY @hip_SOURCE_DIR@/include DESTINATION .) install(FILES @PROJECT_BINARY_DIR@/.version DESTINATION bin) install(DIRECTORY @hip_SOURCE_DIR@/cmake DESTINATION .) From 4be59b9250e36490fffabd23c8ffed4927e695b2 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 22:39:42 +0530 Subject: [PATCH 17/30] Add back rocm-profiler as a dependency for hip_hcc package This reverts commit 0d8126a9eb0b39b191cb2171465644b84444b16a. [ROCm/clr commit: ccc695d685f05b8fa96826dd6190257f89d9df66] --- projects/clr/hipamd/packaging/hip_hcc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/packaging/hip_hcc.txt b/projects/clr/hipamd/packaging/hip_hcc.txt index 556bade072..661d77e530 100644 --- a/projects/clr/hipamd/packaging/hip_hcc.txt +++ b/projects/clr/hipamd/packaging/hip_hcc.txt @@ -20,12 +20,12 @@ set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR} set(CPACK_GENERATOR "TGZ;DEB;RPM") set(CPACK_BINARY_DEB "ON") set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip_base (= ${CPACK_PACKAGE_VERSION}), hcc_lc (= @HCC_VERSION@)") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip_base (= ${CPACK_PACKAGE_VERSION}), hcc_lc (= @HCC_VERSION@), rocm-profiler") set(CPACK_BINARY_RPM "ON") set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst") set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm") set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") -set(CPACK_RPM_PACKAGE_REQUIRES "hip_base = ${CPACK_PACKAGE_VERSION}, hcc_lc = @HCC_VERSION@") +set(CPACK_RPM_PACKAGE_REQUIRES "hip_base = ${CPACK_PACKAGE_VERSION}, hcc_lc = @HCC_VERSION@, rocm-profiler") set(CPACK_SOURCE_GENERATOR "TGZ") include(CPack) From 8e0733f958594cebb2202d69907deb325f1dfcb9 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Wed, 5 Oct 2016 11:47:12 -0500 Subject: [PATCH 18/30] Add HIP_BLOCKING_SYNC environment var to control stream sync behavior. [ROCm/clr commit: 6950d3f9e95c72721d9b3629c4aac0478a5217d5] --- projects/clr/hipamd/src/hip_hcc.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/src/hip_hcc.cpp b/projects/clr/hipamd/src/hip_hcc.cpp index f76c454e2e..2b5834cabc 100644 --- a/projects/clr/hipamd/src/hip_hcc.cpp +++ b/projects/clr/hipamd/src/hip_hcc.cpp @@ -69,6 +69,7 @@ int HIP_ATP_MARKER= 0; int HIP_DB= 0; int HIP_VISIBLE_DEVICES = 0; /* Contains a comma-separated sequence of GPU identifiers */ int HIP_NUM_KERNELS_INFLIGHT = 128; +int HIP_BLOCKING_SYNC = 0; std::once_flag hip_initialized; @@ -177,7 +178,7 @@ void ihipStream_t::wait(LockedAccessor_StreamCrit_t &crit, bool assertQueueEmpty { if (! assertQueueEmpty) { tprintf (DB_SYNC, "stream %p wait for queue-empty..\n", this); - crit->_av.wait(); + crit->_av.wait(HIP_BLOCKING_SYNC ? hc::hcWaitModeBlocked : hc::hcWaitModeActive); } crit->_kernelCnt = 0; @@ -257,8 +258,8 @@ void ihipStream_t::lockclose_postKernelCommand(hc::accelerator_view *av) { if (HIP_LAUNCH_BLOCKING) { - // TODO - fix this so it goes through proper stream::wait() call. - av->wait(); // direct wait OK since we know the stream is locked. + // TODO - fix this so it goes through proper stream::wait() call.// direct wait OK since we know the stream is locked. + av->wait(hc::hcWaitModeActive); tprintf(DB_SYNC, " %s LAUNCH_BLOCKING for kernel completion\n", ToString(this).c_str()); } @@ -1008,7 +1009,9 @@ void ihipInit() READ_ENV_I(release, HIP_VISIBLE_DEVICES, CUDA_VISIBLE_DEVICES, "Only devices whose index is present in the secquence are visible to HIP applications and they are enumerated in the order of secquence" ); - READ_ENV_I(release, HIP_NUM_KERNELS_INFLIGHT, 128, "Number of kernels per stream "); + READ_ENV_I(release, HIP_BLOCKING_SYNC, 0, "Use blocking synchronization for stream waits. This may increase latency but is friendlier to other processes. If 0, spin-wait."); + + READ_ENV_I(release, HIP_NUM_KERNELS_INFLIGHT, 128, "Max number of inflight kernels per stream before active synchronization is forced."); // Some flags have both compile-time and runtime flags - generate a warning if user enables the runtime flag but the compile-time flag is disabled. if (HIP_DB && !COMPILE_HIP_DB) { From c348792a583b410d75cf2d770a927d84ae1256d1 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Wed, 5 Oct 2016 11:47:41 -0500 Subject: [PATCH 19/30] Don't save error status on ihip function. [ROCm/clr commit: 3ea5aac9a32cd48b49fda8a70b42e9dce9b836b0] --- projects/clr/hipamd/src/hip_stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index 2b81515784..751ebea12f 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -52,7 +52,7 @@ hipError_t ihipStreamCreate(hipStream_t *stream, unsigned int flags) e = hipErrorInvalidDevice; } - return ihipLogStatus(e); + return e; } From 0836c5345f82102e19649b925e21498da26d96d6 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Wed, 5 Oct 2016 12:17:59 -0500 Subject: [PATCH 20/30] Update docs (supported env vars). [ROCm/clr commit: 8cb899ccf9e21f74bfefba60de9d55af78aa2a70] --- projects/clr/hipamd/docs/markdown/hip_porting_guide.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/projects/clr/hipamd/docs/markdown/hip_porting_guide.md b/projects/clr/hipamd/docs/markdown/hip_porting_guide.md index 148f3a09dd..cc964bc62a 100644 --- a/projects/clr/hipamd/docs/markdown/hip_porting_guide.md +++ b/projects/clr/hipamd/docs/markdown/hip_porting_guide.md @@ -570,13 +570,10 @@ HIP_PRINT_ENV = 1 : Print HIP environment variables. HIP_LAUNCH_BLOCKING = 0 : Make HIP APIs 'host-synchronous', so they block until any kernel launches or data copy commands complete. Alias: CUDA_LAUNCH_BLOCKING. HIP_DB = 0 : Print various debug info. Bitmask, see hip_hcc.cpp for more information. HIP_TRACE_API = 0 : Trace each HIP API call. Print function name and return code to stderr as program executes. -HIP_STAGING_SIZE = 64 : Size of each staging buffer (in KB) -HIP_STAGING_BUFFERS = 2 : Number of staging buffers to use in each direction. 0=use hsa_memory_copy. -HIP_PININPLACE = 0 : For unpinned transfers, pin the memory in-place in chunks before doing the copy. Under development. -HIP_STREAM_SIGNALS = 2 : Number of signals to allocate when new stream is created (signal pool will grow on demand) +HIP_TRACE_API_COLOR = green : Color to use for HIP_API. None/Red/Green/Yellow/Blue/Magenta/Cyan/White +HIP_ATP_MARKER = 0 : Add HIP function begin/end to ATP file generated with CodeXL HIP_VISIBLE_DEVICES = 0 : Only devices whose index is present in the secquence are visible to HIP applications and they are enumerated in the order of secquence -HIP_DISABLE_HW_KERNEL_DEP = 1 : Disable HW dependencies before kernel commands - instead wait for dependency on host. -1 means ignore these dependencies. (debug mode) -HIP_DISABLE_HW_COPY_DEP = 1 : Disable HW dependencies before copy commands - instead wait for dependency on host. -1 means ifnore these dependencies (debug mode) +HIP_NUM_KERNELS_INFLIGHT = 128 : Number of kernels per stream ``` From a79b334fbcada4c07ef70f2f9a4ba013f968380d Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Wed, 5 Oct 2016 12:18:16 -0500 Subject: [PATCH 21/30] Add DISABLE_COPY_EXT option. [ROCm/clr commit: 250f711ed0dcf74b7fc93d54cbd907e3d7c06dcc] --- projects/clr/hipamd/src/hip_hcc.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/src/hip_hcc.cpp b/projects/clr/hipamd/src/hip_hcc.cpp index 2b5834cabc..1fc0ced6bf 100644 --- a/projects/clr/hipamd/src/hip_hcc.cpp +++ b/projects/clr/hipamd/src/hip_hcc.cpp @@ -53,10 +53,6 @@ THE SOFTWARE. //================================================================================================= const int release = 1; -#define MEMCPY_D2H_STAGING_VS_PININPLACE_COPY_THRESHOLD 4194304 -#define MEMCPY_H2D_DIRECT_VS_STAGING_COPY_THRESHOLD 65336 -#define MEMCPY_H2D_STAGING_VS_PININPLACE_COPY_THRESHOLD 1048576 - const char *API_COLOR = KGRN; const char *API_COLOR_END = KNRM; @@ -71,6 +67,8 @@ int HIP_VISIBLE_DEVICES = 0; /* Contains a comma-separated sequence of GPU ident int HIP_NUM_KERNELS_INFLIGHT = 128; int HIP_BLOCKING_SYNC = 0; +//#define DISABLE_COPY_EXT 1 + std::once_flag hip_initialized; @@ -1454,7 +1452,13 @@ void ihipStream_t::locked_copySync(void* dst, const void* src, size_t sizeBytes, { LockedAccessor_StreamCrit_t crit (_criticalData); +#if DISABLE_COPY_EXT +#warning ("Disabled copy_ext path, P2P host staging copies will not work") + // Note - peer-to-peer copies which require host staging will not work in this path. + crit->_av.copy(src, dst, sizeBytes); +#else crit->_av.copy_ext(src, dst, sizeBytes, hcCopyDir, srcPtrInfo, dstPtrInfo, forceHostCopyEngine); +#endif } } From 85bf3aa346211c49af4445811a49ae99b8d929b7 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 22:58:04 +0530 Subject: [PATCH 22/30] Update hip_hcc packaging steps Change-Id: I0ab16d8aef1dd33a971f73b3a6faa067df495d55 [ROCm/clr commit: eb78b13a6fafc14d9623b74519141dcea9f73b77] --- projects/clr/hipamd/packaging/hip_hcc.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/packaging/hip_hcc.txt b/projects/clr/hipamd/packaging/hip_hcc.txt index 661d77e530..f6d33ca474 100644 --- a/projects/clr/hipamd/packaging/hip_hcc.txt +++ b/projects/clr/hipamd/packaging/hip_hcc.txt @@ -1,7 +1,14 @@ cmake_minimum_required(VERSION 2.8.3) project(hip_hcc) -install(DIRECTORY @PROJECT_BINARY_DIR@/CMakeFiles/hip_hcc.dir/src/ DESTINATION lib) +if(@HIP_LIB_TYPE@ EQUAL 0) + install(DIRECTORY @PROJECT_BINARY_DIR@/CMakeFiles/hip_hcc.dir/src/ DESTINATION lib) +elseif(@HIP_LIB_TYPE@ EQUAL 1) + install(DIRECTORY @PROJECT_BINARY_DIR@/libhip_hcc.a DESTINATION lib) +else() + install(DIRECTORY @PROJECT_BINARY_DIR@/libhip_hcc.so DESTINATION lib) +endif() +install(FILES @PROJECT_BINARY_DIR@/.buildInfo DESTINATION lib) ############################# # Packaging steps From 5d1934886815a0138dc923db4a005462564ff4d5 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 23:01:52 +0530 Subject: [PATCH 23/30] hip_doc package: Update markdown to html script Change-Id: Ic7fe4f4df71621789ef4c0ce8103752ea32f3fd8 [ROCm/clr commit: 398d45c677ed02eef712410fe008dbf1cce96160] --- projects/clr/hipamd/packaging/convert_md_to_html.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/clr/hipamd/packaging/convert_md_to_html.sh b/projects/clr/hipamd/packaging/convert_md_to_html.sh index 0f6237deb6..b2c868cded 100755 --- a/projects/clr/hipamd/packaging/convert_md_to_html.sh +++ b/projects/clr/hipamd/packaging/convert_md_to_html.sh @@ -21,24 +21,24 @@ trap cleanup EXIT export GRIPURL=$hip_srcdir export GRIPHOME=$workdir echo "CACHE_DIRECTORY = '$html_destdir/asset'" > $workdir/settings.py -mkdir -p $html_destdir $html_destdir/clang-hipify $html_destdir/docs/markdown +mkdir -p $html_destdir $html_destdir/hipify-clang $html_destdir/docs/markdown # convert all md files to html pushd $hip_srcdir -for f in *.md clang-hipify/*.md docs/markdown/*.md; do grip --export --no-inline $f $html_destdir/${f%.*}.html; done +for f in *.md hipify-clang/*.md docs/markdown/*.md; do grip --export --no-inline $f $html_destdir/${f%.*}.html; done popd # convert absolute links to relative links pushd $html_destdir for f in *.html; do sed -i "s?$GRIPURL/??g" $f; done -for f in clang-hipify/*.html; do sed -i "s?$GRIPURL/?../?g" $f; done +for f in hipify-clang/*.html; do sed -i "s?$GRIPURL/?../?g" $f; done for f in docs/markdown/*.html; do sed -i "s?$GRIPURL/?../../?g" $f; done popd # update document titles pushd $html_destdir for f in *.html; do sed -i "s?.md - Grip??g" $f; done -for f in clang-hipify/*.html; do sed -i "s?.md - Grip??g" $f; done +for f in hipify-clang/*.html; do sed -i "s?.md - Grip??g" $f; done for f in docs/markdown/*.html; do sed -i "s?.md - Grip??g" $f; done popd @@ -46,8 +46,8 @@ popd pushd $html_destdir for f in *.html; do sed -i "s?.md\"?.html\"?g" $f; done for f in *.html; do sed -i "s?.md#?.html#?g" $f; done -for f in clang-hipify/*.html; do sed -i "s?.md\"?.html\"?g" $f; done -for f in clang-hipify/*.html; do sed -i "s?.md#?.html#?g" $f; done +for f in hipify-clang/*.html; do sed -i "s?.md\"?.html\"?g" $f; done +for f in hipify-clang/*.html; do sed -i "s?.md#?.html#?g" $f; done for f in docs/markdown/*.html; do sed -i "s?.md\"?.html\"?g" $f; done for f in docs/markdown/*.html; do sed -i "s?.md#?.html#?g" $f; done popd From 99d47a085011c189fde2ce38619d72c34170a652 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 5 Oct 2016 23:07:14 +0530 Subject: [PATCH 24/30] clang-hipify -> hipify-clang in documentation Change-Id: I86ebc8112477db0d3e09f240beb3f9222d909ee6 [ROCm/clr commit: eb1fce0d778052c5c48101f4d65c0eb09123ca9a] --- projects/clr/hipamd/README.md | 2 +- projects/clr/hipamd/docs/markdown/hip_faq.md | 4 ++-- .../clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md | 2 +- projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md | 2 +- .../clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/Readme.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/clr/hipamd/README.md b/projects/clr/hipamd/README.md index f9bdcba9a5..83d041786e 100644 --- a/projects/clr/hipamd/README.md +++ b/projects/clr/hipamd/README.md @@ -33,7 +33,7 @@ HIP releases are typically of two types. The tag naming convention is different - [HIP Porting Guide](docs/markdown/hip_porting_guide.md) - [HIP Porting Driver Guide](docs/markdown/hip_porting_driver_api.md) - [HIP Terminology](docs/markdown/hip_terms.md) (including Rosetta Stone of GPU computing terms across CUDA/HIP/HC/AMP/OpenL) -- [clang-hipify](clang-hipify/README.md) +- [hipify-clang](hipify-clang/README.md) - [Developer/CONTRIBUTING Info](CONTRIBUTING.md) - [Release Notes](RELEASE.md) diff --git a/projects/clr/hipamd/docs/markdown/hip_faq.md b/projects/clr/hipamd/docs/markdown/hip_faq.md index b09771ab71..f2fa3346cc 100644 --- a/projects/clr/hipamd/docs/markdown/hip_faq.md +++ b/projects/clr/hipamd/docs/markdown/hip_faq.md @@ -114,7 +114,7 @@ These offer pointer-based memory interfaces (as opposed to opaque buffers) and c - [hcsparse](https://bitbucket.org/multicoreware/hcsparse) - [hcrng](https://bitbucket.org/multicoreware/hcrng) -Additionally, some of the cublas routines are automatically converted to hipblas equivalents by the clang-hipify tool. These APIs use cublas or hcblas depending on the platform, and replace the need +Additionally, some of the cublas routines are automatically converted to hipblas equivalents by the hipify-clang tool. These APIs use cublas or hcblas depending on the platform, and replace the need to use conditional compilation. ### How does HIP compare with OpenCL? @@ -148,7 +148,7 @@ The tools also struggle with more complex CUDA applications, in particular those ### Does Hipify automatically convert all source code? Typically, Hipify can automatically convert almost all run-time code, and the coordinate indexing device code (i.e. threadIdx.x -> hipThreadIdx_x). Most device code needs no additional conversion, since HIP and CUDA have similar names for math and built-in functions. -The clang-hipify tool will automatically modify the kernel signature as needed (automating a step that used to be done manually) +The hipify-clang tool will automatically modify the kernel signature as needed (automating a step that used to be done manually) Additional porting may be required to deal with architecture feature queries or with CUDA capabilities that HIP doesn't support. In general, developers should always expect to perform some platform-specific tuning and optimization. diff --git a/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md b/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md index b1c0b261b9..5e9483b595 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md +++ b/projects/clr/hipamd/samples/2_Cookbook/0_MatrixTranspose/Readme.md @@ -95,6 +95,6 @@ Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia - [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) +- [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) diff --git a/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md b/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md index bf5df9c763..e3ec8ad780 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md +++ b/projects/clr/hipamd/samples/2_Cookbook/1_hipEvent/Readme.md @@ -69,6 +69,6 @@ Use hipcc to build the application, which is using hcc on AMD and nvcc on nvidia - [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) +- [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) diff --git a/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/Readme.md b/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/Readme.md index 2bba31d349..de1a800572 100644 --- a/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/Readme.md +++ b/projects/clr/hipamd/samples/2_Cookbook/2_HIP_ATP_MARKER/Readme.md @@ -46,6 +46,6 @@ Note this trace mode uses colors. "less -r" can handle raw control characters an - [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) +- [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) From c7da2fe434b71d7370cf885df5b1de4352117099 Mon Sep 17 00:00:00 2001 From: Elias Konstantinidis Date: Sun, 2 Oct 2016 10:07:31 +0300 Subject: [PATCH 25/30] Added support for __mul24 and __umul24 [ROCm/clr commit: adc763f4402be363dd28dfaf49e013a570ef4756] --- .../clr/hipamd/include/hip/hcc_detail/hip_runtime.h | 3 +++ projects/clr/hipamd/src/device_util.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+) mode change 100644 => 100755 projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h mode change 100644 => 100755 projects/clr/hipamd/src/device_util.cpp diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h old mode 100644 new mode 100755 index c89faaae11..47b75f282d --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h @@ -430,6 +430,9 @@ __device__ unsigned int atomicInc(unsigned int* address, __device__ unsigned int atomicDec(unsigned int* address, unsigned int val); +//__mul24 __umul24 +__device__ int __mul24(int arg1, int arg2); +__device__ unsigned int __umul24(unsigned int arg1, unsigned int arg2); // integer intrinsic function __poc __clz __ffs __brev __device__ unsigned int __popc( unsigned int input); diff --git a/projects/clr/hipamd/src/device_util.cpp b/projects/clr/hipamd/src/device_util.cpp old mode 100644 new mode 100755 index 21a58d7070..6c608d891e --- a/projects/clr/hipamd/src/device_util.cpp +++ b/projects/clr/hipamd/src/device_util.cpp @@ -1672,6 +1672,17 @@ __device__ unsigned int atomicDec(unsigned int* address, return hc::__atomic_wrapdec(address,val); } +//__mul24 __umul24 +__device__ int __mul24(int arg1, + int arg2) +{ + return hc::__mul24(arg1, arg2); +} +__device__ unsigned int __umul24(unsigned int arg1, + unsigned int arg2) +{ + return hc::__mul24(arg1, arg2); +} __device__ unsigned int test__popc(unsigned int input) { From 2f797fe430b677f54df35fd88c820b4cd16e726d Mon Sep 17 00:00:00 2001 From: Elias Konstantinidis Date: Sun, 2 Oct 2016 10:08:07 +0300 Subject: [PATCH 26/30] Added __mul24 & __umul24 documentation entry [ROCm/clr commit: 4c8be4c6554ff098e683b7ed90c76fef41a49ae5] --- projects/clr/hipamd/docs/markdown/hip_kernel_language.md | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 projects/clr/hipamd/docs/markdown/hip_kernel_language.md diff --git a/projects/clr/hipamd/docs/markdown/hip_kernel_language.md b/projects/clr/hipamd/docs/markdown/hip_kernel_language.md old mode 100644 new mode 100755 index ed9dc2fbe9..4b8762025e --- a/projects/clr/hipamd/docs/markdown/hip_kernel_language.md +++ b/projects/clr/hipamd/docs/markdown/hip_kernel_language.md @@ -451,6 +451,8 @@ Following is the list of supported integer intrinsics. Note that intrinsics are | unsigned int __ffsll(long long int x)
Find the position of least signigicant bit set to 1 in a 64 bit signed integer. | | unsigned int __popc ( unsigned int x )
Count the number of bits that are set to 1 in a 32 bit integer. | | int __popcll ( unsigned long long int x )
Count the number of bits that are set to 1 in a 64 bit integer. | +| int __mul24 ( int x, int y )
Multiply two 24bit integers. | +| unsigned int __umul24 ( unsigned int x, unsigned int y )
Multiply two 24bit unsigned integers. | [1] The hcc implementation of __ffs() and __ffsll() contains code to add a constant +1 to produce the ffs result format. For the cases where this overhead is not acceptable and programmer is willing to specialize for the platform, From 9624b4ae8874b3195c5e75667edef7826ea61813 Mon Sep 17 00:00:00 2001 From: Elias Konstantinidis Date: Sun, 2 Oct 2016 08:16:10 +0000 Subject: [PATCH 27/30] Enabled tests for __mul24 & __umul24 [ROCm/clr commit: 49534c5ea915a12ed467de12d12d2702873ceb7e] --- .../clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp b/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp index 250dc1d949..abe0b66e90 100644 --- a/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp +++ b/projects/clr/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp @@ -35,7 +35,7 @@ __device__ void integer_intrinsics() __ffs((int)10); __ffsll((long long)10); //__hadd((int)1, (int)3); - //__mul24((int)1, (int)2); + __mul24((int)1, (int)2); //__mul64hi((long long)1, (long long)2); //__mulhi((int)1, (int)2); __popc((unsigned int)4); @@ -45,7 +45,7 @@ __device__ void integer_intrinsics() //__rhadd((int)1, (int)2); //__sad((int)1, (int)2, 0); //__uhadd((unsigned int)1, (unsigned int)3); - //__umul24((unsigned int)1, (unsigned int)2); + __umul24((unsigned int)1, (unsigned int)2); //__umul64hi((unsigned long long)1, (unsigned long long)2); //__umulhi((unsigned int)1, (unsigned int)2); //__urhadd((unsigned int)1, (unsigned int)2); From 7c9a869b4aada9195581db7fc5948d3d13843653 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Thu, 6 Oct 2016 09:50:35 +0530 Subject: [PATCH 28/30] Set _binary_kernel_* symbol value to 1 Change-Id: I92255a8238a8084010662a3ccf5d624dd2d352c0 [ROCm/clr commit: 747c63bee5f5e86fdec70173143880fa67f9fdd0] --- projects/clr/hipamd/bin/hipcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/bin/hipcc b/projects/clr/hipamd/bin/hipcc index 9d70072767..5c991bfc25 100755 --- a/projects/clr/hipamd/bin/hipcc +++ b/projects/clr/hipamd/bin/hipcc @@ -102,7 +102,7 @@ if ($HIP_PLATFORM eq "hcc") { if ($HOST_OSNAME eq "ubuntu" and $HOST_OSVER eq "\"16.04\"") { # No additional flags required } else { - $HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=0 -Wl,--defsym=_binary_kernel_spir_start=0 -Wl,--defsym=_binary_kernel_cl_start=0 -Wl,--defsym=_binary_kernel_cl_end=0"; + $HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=1 -Wl,--defsym=_binary_kernel_spir_start=1 -Wl,--defsym=_binary_kernel_cl_start=1 -Wl,--defsym=_binary_kernel_cl_end=1"; } # Satisfy HCC dependencies From 6b4176892013cb58339a670a64962d1e225d6009 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Fri, 7 Oct 2016 11:44:26 +0530 Subject: [PATCH 29/30] Remove deprecated make and cmake files Change-Id: I8cac0ec9cb997214559627425af207bbb9be0ddf [ROCm/clr commit: c4dd17cce947956de362ceabd21d778fb0a74bb5] --- projects/clr/hipamd/docs/Makefile | 5 - projects/clr/hipamd/tests/src/CMakeLists.txt | 243 ------------------ .../hipamd/tests/src/context/CMakeLists.txt | 9 - .../hipamd/tests/src/deviceLib/CMakeLists.txt | 46 ---- .../hipamd/tests/src/kernel/CMakeLists.txt | 16 -- .../tests/src/launch_bounds/CMakeLists.txt | 8 - .../tests/src/runtimeApi/CMakeLists.txt | 7 - .../src/runtimeApi/memory/CMakeLists.txt | 31 --- .../src/runtimeApi/multiThread/CMakeLists.txt | 15 -- .../src/runtimeApi/stream/CMakeLists.txt | 15 -- 10 files changed, 395 deletions(-) delete mode 100644 projects/clr/hipamd/docs/Makefile delete mode 100644 projects/clr/hipamd/tests/src/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/context/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/deviceLib/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/kernel/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/launch_bounds/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/runtimeApi/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/runtimeApi/memory/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/runtimeApi/multiThread/CMakeLists.txt delete mode 100644 projects/clr/hipamd/tests/src/runtimeApi/stream/CMakeLists.txt diff --git a/projects/clr/hipamd/docs/Makefile b/projects/clr/hipamd/docs/Makefile deleted file mode 100644 index 927b5be3de..0000000000 --- a/projects/clr/hipamd/docs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -HIP_PATH ?= .. -DOXYGEN_SRC=$(wildcard $(HIP_PATH)/include/hcc_detail/*.h) $(wildcard $(HIP_PATH)/include/*.h) $(HIP_PATH)/src/hip_hcc.cpp $(wildcard doxygen-input/*) - -doc: $(DOXYGEN_SRC) - HIP_PATH=$(HIP_PATH) doxygen doxygen-input/doxy.cfg diff --git a/projects/clr/hipamd/tests/src/CMakeLists.txt b/projects/clr/hipamd/tests/src/CMakeLists.txt deleted file mode 100644 index 2f8c8f0a69..0000000000 --- a/projects/clr/hipamd/tests/src/CMakeLists.txt +++ /dev/null @@ -1,243 +0,0 @@ -cmake_minimum_required(VERSION 2.6) - -# remove CMAKE_CXX_COMPILER entry from cache since it will be pointing to hipcc -unset(CMAKE_CXX_COMPILER CACHE) -# remove HIP_PATH entry from cache since we might be running tests with a different configuration -unset(HIP_PATH CACHE) - -project(HIP_Unit_Tests) -include(CTest) -set(HIPTEST_SOURCE_DIR ${PROJECT_SOURCE_DIR}) - -string(ASCII 27 Esc) -set(ColorReset "${Esc}[m") -set(Red "${Esc}[31m") -set(Magenta "${Esc}[35m") - -# Enable multi-gpu tests -if(NOT DEFINED HIP_MULTI_GPU) - set(HIP_MULTI_GPU 0 CACHE BOOL "Run tests requiring more than one GPU") -endif() - -# We are going to use HIP source... -get_filename_component(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../.. ABSOLUTE) - -# ...so we first need to determine the options to cascade to HIP build. -if(DEFINED HIP_PLATFORM) - set(ENV{HIP_PLATFORM} ${HIP_PLATFORM}) -endif() -if(DEFINED HCC_HOME) - get_filename_component(HCC_HOME ${HCC_HOME} ABSOLUTE) - set(ENV{HCC_HOME} ${HCC_HOME}) - set(ENV{HIP_DEVELOPER} 1) -endif() -if(DEFINED HIP_LIB_TYPE) - set(ENV{HIP_LIB_TYPE} ${HIP_LIB_TYPE}) -endif() - -# Purge previous HIP installation... -execute_process( - COMMAND "${CMAKE_COMMAND}" -E remove_directory hip - OUTPUT_QUIET - ERROR_QUIET - ) -execute_process( - COMMAND "${CMAKE_COMMAND}" -E make_directory hip - OUTPUT_QUIET - ERROR_QUIET - ) -message(STATUS "Configuring HIP") - -# ...and now build HIP locally. -execute_process( - COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/hip/localbuild ${HIP_SRC_PATH} - WORKING_DIRECTORY hip - RESULT_VARIABLE hip_build_result - OUTPUT_VARIABLE hip_build_log - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET - ) -message("${Magenta}${hip_build_log}${ColorReset}") - -if(hip_build_result) - message(FATAL_ERROR "Error configuring HIP") -else() - message(STATUS "Configuring HIP - done") - message(STATUS "Building HIP") -endif() -execute_process( - COMMAND "${CMAKE_COMMAND}" --build . --target install - WORKING_DIRECTORY hip - RESULT_VARIABLE hip_build_result - OUTPUT_VARIABLE hip_build_log - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET - ) - -# Show HIP build errors if any. -if(hip_build_result) - message("${Red}${hip_build_log}${ColorReset}") - message(FATAL_ERROR "Error building HIP") -else() - # Building HIP is successful. Point HIP_PATH to this location. - message(STATUS "Building HIP - done") - get_filename_component(HIP_PATH ${CMAKE_CURRENT_BINARY_DIR}/hip/localbuild ABSOLUTE) -endif() - -# Add a target to rebuild HIP if HIP source changes. -add_custom_target( - hip ALL - COMMAND "${CMAKE_COMMAND}" --build . --target install - WORKING_DIRECTORY hip - ) - -# Determine HIP_PLATFORM -execute_process(COMMAND ${HIP_PATH}/bin/hipconfig --platform OUTPUT_VARIABLE HIP_PLATFORM) - -if(${HIP_PLATFORM} STREQUAL "hcc") - MESSAGE("HIP_PLATFORM=hcc") -elseif(${HIP_PLATFORM} STREQUAL "nvcc") - MESSAGE("HIP_PLATFORM=nvcc") - - #Need C++11 for threads in some of the tests. - add_definitions(-std=c++11) - - # NVCC does not not support -rdynamic option - set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) -else() - MESSAGE(FATAL_ERROR "UNKNOWN HIP_PLATFORM=" ${HIP_PLATFORM}) -endif() - -set(HIPCC ${HIP_PATH}/bin/hipcc) -set(CMAKE_CXX_COMPILER ${HIPCC} CACHE FILEPATH "CXX Compiler" FORCE) - -add_library(test_common OBJECT test_common.cpp) - -# usage : build_hip_executable(exe_name CPP_FILES) -macro(build_hip_executable exe cpp) - add_executable(${exe} ${cpp} ${ARGN} $) - add_dependencies(${exe} hip) -endmacro() - -# Make a hip executable, using libc++ -macro(build_hip_executable_libcpp exe cpp) - build_hip_executable( ${exe} ${cpp} ${ARGN}) - if(${HIP_PLATFORM} STREQUAL "hcc") - set_source_files_properties(${cpp} i${ARGN} PROPERTIES COMPILE_FLAGS --stdlib=libc++) - endif() -endmacro() - -function(make_named_test exe testname) - add_test(NAME ${testname} - COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN} - ) - set_tests_properties(${testname} - PROPERTIES PASS_REGULAR_EXPRESSION "PASSED" - ) -endfunction() - -macro(make_test exe) - string(REPLACE " " "" smush_args ${ARGN}) - set(testname ${PROJECT_NAME}/${exe}${smush_args}.tst) - - make_named_test(${exe} ${testname} ${ARGN}) -endmacro() - - -macro(make_hipify_test sourceFile) - #string(REPLACE " " "" smush_args ${ARGN}) - set(testname ${sourceFile}${smush_args}.tst) - - add_test(NAME ${testname} - COMMAND ${HIP_PATH}/bin/hipify ${PROJECT_SOURCE_DIR}/${sourceFile} ${ARGN} - ) -endmacro() - - -macro(make_test_matches exe match_string) - string(REPLACE " " "" smush_args ${ARGN}) - set(testname ${exe}${smush_args}.tst) - add_test(NAME ${testname} - COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN} - ) - set_tests_properties(${testname} - PROPERTIES PASS_REGULAR_EXPRESSION ${match_string} - ) -endmacro() - -macro(build_hip_executable_sm35 exe cpp) - build_hip_executable( ${exe} ${cpp} ${ARGN}) - if(${HIP_PLATFORM} STREQUAL "nvcc") - set_source_files_properties(${cpp} i${ARGN} PROPERTIES COMPILE_FLAGS --gpu-architecture=sm_35) - endif() -endmacro() - - -build_hip_executable(hipGetDeviceAttribute hipGetDeviceAttribute.cpp) -build_hip_executable(hipEnvVar hipEnvVar.cpp) -build_hip_executable(hipEnvVarDriver hipEnvVarDriver.cpp) -build_hip_executable(hipEventRecord hipEventRecord.cpp) - -build_hip_executable_libcpp(hipHcc hipHcc.cpp) -#set_source_files_properties(hipHcc.cpp PROPERTIES COMPILE_FLAGS --stdlib=libc++) - -# __workweek fix. -#build_hip_executable_libcpp(hipPointerAttrib hipPointerAttrib.cpp) -build_hip_executable(hipHostMalloc hipHostMalloc.cpp) -build_hip_executable(hipHostGetFlags hipHostGetFlags.cpp) -build_hip_executable(hipHostRegister hipHostRegister.cpp) -build_hip_executable(hipRandomMemcpyAsync hipRandomMemcpyAsync.cpp) -build_hip_executable(hipFuncSetDeviceFlags hipFuncSetDeviceFlags.cpp) -build_hip_executable(hipFuncGetDevice hipFuncGetDevice.cpp) -build_hip_executable(hipFuncSetDevice hipFuncSetDevice.cpp) -build_hip_executable(hipFuncDeviceSynchronize hipFuncDeviceSynchronize.cpp) -build_hip_executable(hipPeerToPeer_simple hipPeerToPeer_simple.cpp) -build_hip_executable(hipTestMemcpyPin hipTestMemcpyPin.cpp) -build_hip_executable(hipDynamicShared hipDynamicShared.cpp) -build_hip_executable(hipLaunchParm hipLaunchParm.cpp) - -if(${HIP_PLATFORM} STREQUAL "hcc") - build_hip_executable(hipArray hipArray.cpp) -endif() - -make_test(hipEventRecord --iterations 10) -make_test(hipEnvVarDriver " ") -make_test(hipLaunchParm " ") -#TODO -reenable -#make_test(hipPointerAttrib " ") - - -make_test(hipHostMalloc " ") -# BS- comment out since test appears broken - asks for device pointer but pointer was never allocated. -#make_test(hipHostGetFlags " ") -make_test(hipHcc " ") -make_test(hipHostRegister " ") -make_test(hipRandomMemcpyAsync " ") -make_test(hipFuncSetDeviceFlags " ") -make_test(hipFuncGetDevice " ") -make_test(hipFuncDeviceSynchronize " ") -make_test(hipTestMemcpyPin " ") - -if(${HIP_MULTI_GPU}) - make_test(hipPeerToPeer_simple " ") # use current device for copy, this fails. - make_test(hipPeerToPeer_simple --memcpyWithPeer) - make_test(hipPeerToPeer_simple --mirrorPeers) # mirror mapping: test to ensure mirror doesn't destroy orig mapping. - -endif() - -if(${HIP_PLATFORM} STREQUAL "hcc") - make_test(hipArray " ") - make_test(hipFuncSetDevice " ") - make_test(hipDynamicShared " ") -endif() - -make_hipify_test(specialFunc.cu) - - -# Add subdirs here: -add_subdirectory(context) -add_subdirectory(deviceLib) -add_subdirectory(runtimeApi) -add_subdirectory(kernel) -# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/tests/src/context/CMakeLists.txt b/projects/clr/hipamd/tests/src/context/CMakeLists.txt deleted file mode 100644 index d04985d001..0000000000 --- a/projects/clr/hipamd/tests/src/context/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -# Functions for kernel attributes (grid_launch, __launch_bounds__, etc) -project (kernel) - -include_directories( ${HIPTEST_SOURCE_DIR} ) - -build_hip_executable_libcpp (hipCtx_simple hipCtx_simple.cpp) -make_test(hipCtx_simple " " ) diff --git a/projects/clr/hipamd/tests/src/deviceLib/CMakeLists.txt b/projects/clr/hipamd/tests/src/deviceLib/CMakeLists.txt deleted file mode 100644 index e2f8abbc0c..0000000000 --- a/projects/clr/hipamd/tests/src/deviceLib/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (deviceLib) - -include_directories( ${HIPTEST_SOURCE_DIR} ) - -build_hip_executable (hip_ballot hip_ballot.cpp) -make_test(hip_ballot " " ) - -build_hip_executable (hip_anyall hip_anyall.cpp) -make_test(hip_anyall " " ) - -build_hip_executable (hip_popc hip_popc.cpp) -make_test(hip_popc " " ) - -build_hip_executable (hip_clz hip_clz.cpp) -make_test(hip_clz " " ) - -build_hip_executable (hip_brev hip_brev.cpp) -make_test(hip_brev " " ) - -build_hip_executable (hip_ffs hip_ffs.cpp) -make_test(hip_ffs " " ) - -build_hip_executable_sm35 (hip_test_ldg hip_test_ldg.cpp) -make_test(hip_test_ldg " " ) - - -build_hip_executable (hipSimpleAtomicsTest hipSimpleAtomicsTest.cpp) -make_test(hipSimpleAtomicsTest " ") - -build_hip_executable (hipMathFunctionsHost hipMathFunctions.cpp hipSinglePrecisionMathHost.cpp hipDoublePrecisionMathHost.cpp) -make_test(hipMathFunctionsHost " ") - -build_hip_executable (hipMathFunctionsDevice hipMathFunctions.cpp hipSinglePrecisionMathDevice.cpp hipDoublePrecisionMathDevice.cpp) -make_test(hipMathFunctionsDevice " ") - -build_hip_executable (hipIntrinsics hipMathFunctions.cpp hipSinglePrecisionIntrinsics.cpp hipDoublePrecisionIntrinsics.cpp hipIntegerIntrinsics.cpp) -make_test(hipIntrinsics " ") - -build_hip_executable (hipTestDevice hipTestDevice.cpp) -make_test(hipTestDevice " ") - -build_hip_executable (hipTestDeviceDouble hipTestDeviceDouble.cpp) -make_test(hipTestDeviceDouble " ") - diff --git a/projects/clr/hipamd/tests/src/kernel/CMakeLists.txt b/projects/clr/hipamd/tests/src/kernel/CMakeLists.txt deleted file mode 100644 index 0c96caddf4..0000000000 --- a/projects/clr/hipamd/tests/src/kernel/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -# Functions for kernel attributes (grid_launch, __launch_bounds__, etc) -project (kernel) - -include_directories( ${HIPTEST_SOURCE_DIR} ) - -build_hip_executable_libcpp (hipLanguageExtensions hipLanguageExtensions.cpp) -make_test(hipLanguageExtensions " " ) - -build_hip_executable (hipGridLaunch hipGridLaunch.cpp) -make_test(hipGridLaunch " " ) - -build_hip_executable (launch_bounds launch_bounds.cpp) -make_test(launch_bounds " ") - diff --git a/projects/clr/hipamd/tests/src/launch_bounds/CMakeLists.txt b/projects/clr/hipamd/tests/src/launch_bounds/CMakeLists.txt deleted file mode 100644 index 838deb7879..0000000000 --- a/projects/clr/hipamd/tests/src/launch_bounds/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (launch_bounds) - -include_directories( ${HIPTEST_SOURCE_DIR} ) - -build_hip_executable (hip_launch_bounds hip_launch_bounds.cpp) -make_test(hip_launch_bounds " ") diff --git a/projects/clr/hipamd/tests/src/runtimeApi/CMakeLists.txt b/projects/clr/hipamd/tests/src/runtimeApi/CMakeLists.txt deleted file mode 100644 index 86cc0ca1b1..0000000000 --- a/projects/clr/hipamd/tests/src/runtimeApi/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (runtimeApi) - -add_subdirectory(memory) -add_subdirectory(multiThread) -add_subdirectory(stream) diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/CMakeLists.txt b/projects/clr/hipamd/tests/src/runtimeApi/memory/CMakeLists.txt deleted file mode 100644 index 2a911bbea8..0000000000 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (runtimeApi/memory) - -include_directories( ${HIPTEST_SOURCE_DIR} ) - -build_hip_executable (hipMemset hipMemset.cpp) -make_test(hipMemset " " ) -make_test(hipMemset --N 10 --memsetval 0x42 ) # small copy, just 10 bytes. -make_test(hipMemset --N 10013 --memsetval 0x5a ) # oddball size. -make_test(hipMemset --N 256M --memsetval 0xa6 ) # big copy - -build_hip_executable (hipMemcpy_simple hipMemcpy_simple.cpp) -make_test(hipMemcpy_simple " " ) - -build_hip_executable (hipMemcpy hipMemcpy.cpp) -make_named_test(hipMemcpy "hipMemcpy-modes" --tests 0x1 ) -make_named_test(hipMemcpy "hipMemcpy-size" --tests 0x6 ) -make_named_test(hipMemcpy "hipMemcpy-multithreaded" --tests 0x8 ) - -build_hip_executable (hipMemcpyAsync hipMemcpyAsync.cpp) -make_named_test(hipMemcpy_simple "hipMemcpyAsync-simple" --async) -#make_test(hipMemcpyAsync " " ) - -build_hip_executable (hipMemoryAllocate hipMemoryAllocate.cpp) - -build_hip_executable (hipMemcpyAll hipMemcpyAll.cpp) -#make_test(hipMemcpyAll " ") - -# Debug synchronization, then enable. -make_test(hipMemoryAllocate " ") diff --git a/projects/clr/hipamd/tests/src/runtimeApi/multiThread/CMakeLists.txt b/projects/clr/hipamd/tests/src/runtimeApi/multiThread/CMakeLists.txt deleted file mode 100644 index c855c8129e..0000000000 --- a/projects/clr/hipamd/tests/src/runtimeApi/multiThread/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (runtimeApi/multiThread) - -include_directories( ${HIPTEST_SOURCE_DIR} ) - -build_hip_executable (hipMultiThreadStreams1 hipMultiThreadStreams1.cpp) -build_hip_executable (hipMultiThreadStreams2 hipMultiThreadStreams2.cpp) -build_hip_executable (hipMultiThreadDevice hipMultiThreadDevice.cpp) - -#make_test(hipMultiThreadStreams1 " " ) Fails if 0x3 specified, passes otherwise. -make_test(hipMultiThreadStreams2 " " ) -make_named_test (hipMultiThreadDevice "hipMultiThreadDevice-serial" --tests 0x1) -make_named_test (hipMultiThreadDevice "hipMultiThreadDevice-pyramid" --tests 0x4) -make_named_test (hipMultiThreadDevice "hipMultiThreadDevice-nearzero" --tests 0x10) diff --git a/projects/clr/hipamd/tests/src/runtimeApi/stream/CMakeLists.txt b/projects/clr/hipamd/tests/src/runtimeApi/stream/CMakeLists.txt deleted file mode 100644 index 88959d5762..0000000000 --- a/projects/clr/hipamd/tests/src/runtimeApi/stream/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (runtimeApi/stream) - -include_directories( ${HIPTEST_SOURCE_DIR} ) -build_hip_executable (hipAPIStreamEnable hipAPIStreamEnable.cpp) -build_hip_executable (hipAPIStreamDisable hipAPIStreamDisable.cpp) -build_hip_executable (hipStreamL5 hipStreamL5.cpp) -build_hip_executable (hipStreamWaitEvent hipStreamWaitEvent.cpp) - -# TODO - seg fault -#make_test(hipAPIStreamEnable " ") -#make_test(hipAPIStreamDisable " ") -make_test(hipStreamL5 " ") -make_test(hipStreamWaitEvent " ") From 2cd4fdb4caf88e0311718fe04e2e19c0a805ebb6 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Fri, 7 Oct 2016 15:44:59 +0530 Subject: [PATCH 30/30] Fixed typos in packaging script for hip_hcc package Change-Id: I79237e7364518066585d5c88bd54e3b30f832076 [ROCm/clr commit: 5dc8a6a9e8d6007735312669b9762f9b0c845fba] --- projects/clr/hipamd/packaging/hip_hcc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/packaging/hip_hcc.txt b/projects/clr/hipamd/packaging/hip_hcc.txt index f6d33ca474..662a026b87 100644 --- a/projects/clr/hipamd/packaging/hip_hcc.txt +++ b/projects/clr/hipamd/packaging/hip_hcc.txt @@ -4,9 +4,9 @@ project(hip_hcc) if(@HIP_LIB_TYPE@ EQUAL 0) install(DIRECTORY @PROJECT_BINARY_DIR@/CMakeFiles/hip_hcc.dir/src/ DESTINATION lib) elseif(@HIP_LIB_TYPE@ EQUAL 1) - install(DIRECTORY @PROJECT_BINARY_DIR@/libhip_hcc.a DESTINATION lib) + install(FILES @PROJECT_BINARY_DIR@/libhip_hcc.a DESTINATION lib) else() - install(DIRECTORY @PROJECT_BINARY_DIR@/libhip_hcc.so DESTINATION lib) + install(FILES @PROJECT_BINARY_DIR@/libhip_hcc.so DESTINATION lib) endif() install(FILES @PROJECT_BINARY_DIR@/.buildInfo DESTINATION lib)