Merge 'master' into 'amd-master'

Change-Id: I98b35de27e2c7a693d46f0c36e8cdcee7282d910
이 커밋은 다음에 포함됨:
Jenkins
2019-07-26 05:10:17 -04:00
16개의 변경된 파일881개의 추가작업 그리고 674개의 파일을 삭제
+1 -1
파일 보기
@@ -254,7 +254,7 @@ if(HIP_PLATFORM STREQUAL "hcc")
execute_process(COMMAND ${HCC_HOME}/bin/hcc-config --ldflags OUTPUT_VARIABLE HCC_LD_FLAGS)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${HCC_LD_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --amdgpu-target=gfx701 --amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --amdgpu-target=gfx701 --amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906 --amdgpu-target=gfx908")
if(COMPILE_HIP_ATP_MARKER)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L/opt/rocm/profiler/CXLActivityLogger/bin/x86_64 -lCXLActivityLogger")
endif()
+23
파일 보기
@@ -156,6 +156,7 @@ $target_gfx802 = 0;
$target_gfx803 = 0;
$target_gfx900 = 0;
$target_gfx906 = 0;
$target_gfx908 = 0;
$target_gfx1010 = 0;
$target_gfx1012 = 0;
$default_amdgpu_target = 1;
@@ -429,6 +430,11 @@ foreach $arg (@ARGV)
$target_gfx906 = 1;
$default_amdgpu_target = 0;
}
if($arg eq '--amdgpu-target=gfx908')
{
$target_gfx908 = 1;
$default_amdgpu_target = 0;
}
if($arg eq '--amdgpu-target=gfx1010')
{
$target_gfx1010 = 1;
@@ -670,6 +676,11 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
$target_gfx906 = 1;
$default_amdgpu_target = 0;
}
if($target eq 'gfx908')
{
$target_gfx908 = 1;
$default_amdgpu_target = 0;
}
if($target eq 'gfx1010')
{
$target_gfx1010 = 1;
@@ -715,6 +726,10 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
$target_gfx906 = 1;
$default_amdgpu_target = 0;
}
if($val eq "gfx908") {
$target_gfx908 = 1;
$default_amdgpu_target = 0;
}
if($val eq 'gfx1010')
{
$target_gfx1010 = 1;
@@ -789,6 +804,14 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
}
$HIPCXXFLAGS .= " -D__HIP_ARCH_GFX906__=1 ";
}
if ($target_gfx908 eq 1) {
$GPU_ARCH_ARG = $GPU_ARCH_OPT . "gfx908";
$HIPLDFLAGS .= $GPU_ARCH_ARG;
if ($HIP_PLATFORM eq 'clang') {
$HIPCXXFLAGS .= $GPU_ARCH_ARG;;
}
$HIPCXXFLAGS .= " -D__HIP_ARCH_GFX908__=1 ";
}
if ($target_gfx1010 eq 1) {
$GPU_ARCH_ARG = $GPU_ARCH_OPT . "gfx1010";
$HIPLDFLAGS .= $GPU_ARCH_ARG;
+134 -132
파일 보기
@@ -2,106 +2,106 @@
## **1. CUBLAS Data types**
| **type** | **CUDA** | **HIP** |**HIP value** (if differs) |
|-------------:|---------------------------------------------------------------|------------------------------------------------------------|---------------------------|
| enum |***`cublasStatus`*** |***`hipblasStatus_t`*** |
| enum |***`cublasStatus_t`*** |***`hipblasStatus_t`*** |
| 0 |*`CUBLAS_STATUS_SUCCESS`* |*`HIPBLAS_STATUS_SUCCESS`* |
| 1 |*`CUBLAS_STATUS_NOT_INITIALIZED`* |*`HIPBLAS_STATUS_NOT_INITIALIZED`* |
| 3 |*`CUBLAS_STATUS_ALLOC_FAILED`* |*`HIPBLAS_STATUS_ALLOC_FAILED`* | 2 |
| 7 |*`CUBLAS_STATUS_INVALID_VALUE`* |*`HIPBLAS_STATUS_INVALID_VALUE`* | 3 |
| 8 |*`CUBLAS_STATUS_ARCH_MISMATCH`* |*`HIPBLAS_STATUS_ARCH_MISMATCH`* | |
| 11 |*`CUBLAS_STATUS_MAPPING_ERROR`* |*`HIPBLAS_STATUS_MAPPING_ERROR`* | 4 |
| 13 |*`CUBLAS_STATUS_EXECUTION_FAILED`* |*`HIPBLAS_STATUS_EXECUTION_FAILED`* | 5 |
| 14 |*`CUBLAS_STATUS_INTERNAL_ERROR`* |*`HIPBLAS_STATUS_INTERNAL_ERROR`* | 6 |
| 15 |*`CUBLAS_STATUS_NOT_SUPPORTED`* |*`HIPBLAS_STATUS_NOT_SUPPORTED`* | 7 |
| 16 |*`CUBLAS_STATUS_LICENSE_ERROR`* | |
| enum |***`cublasOperation_t`*** |***`hipblasOperation_t`*** |
| 0 |*`CUBLAS_OP_N`* |*`HIPBLAS_OP_N`* | 111 |
| 1 |*`CUBLAS_OP_T`* |*`HIPBLAS_OP_T`* | 112 |
| 2 |*`CUBLAS_OP_C`* |*`HIPBLAS_OP_C`* | 113 |
| 2 |*`CUBLAS_OP_HERMITAN`* |*`HIPBLAS_OP_C`* | 113 |
| 3 |*`CUBLAS_OP_CONJG`* | |
| enum |***`cublasFillMode_t`*** |***`hipblasFillMode_t`*** |
| 0 |*`CUBLAS_FILL_MODE_LOWER`* |*`HIPBLAS_FILL_MODE_LOWER`* | 121 |
| 1 |*`CUBLAS_FILL_MODE_UPPER`* |*`HIPBLAS_FILL_MODE_UPPER`* | 122 |
| 1 |*`CUBLAS_FILL_MODE_FULL`* |*`HIPBLAS_FILL_MODE_FULL`* | 123 |
| enum |***`cublasDiagType_t`*** |***`hipblasDiagType_t`*** |
| 0 |*`CUBLAS_DIAG_NON_UNIT`* |*`HIPBLAS_DIAG_NON_UNIT`* | 131 |
| 1 |*`CUBLAS_DIAG_UNIT`* |*`HIPBLAS_DIAG_UNIT`* | 132 |
| enum |***`cublasSideMode_t`*** |***`hipblasSideMode_t`*** |
| 0 |*`CUBLAS_SIDE_LEFT`* |*`HIPBLAS_SIDE_LEFT`* | 141 |
| 1 |*`CUBLAS_SIDE_RIGHT`* |*`HIPBLAS_SIDE_RIGHT`* | 142 |
| enum |***`cublasPointerMode_t`*** |***`hipblasPointerMode_t`*** |
| 0 |*`CUBLAS_POINTER_MODE_HOST`* |*`HIPBLAS_POINTER_MODE_HOST`* |
| 1 |*`CUBLAS_POINTER_MODE_DEVICE`* |*`HIPBLAS_POINTER_MODE_DEVICE`* |
| enum |***`cublasAtomicsMode_t`*** | |
| 0 |*`CUBLAS_ATOMICS_NOT_ALLOWED`* | |
| 1 |*`CUBLAS_ATOMICS_ALLOWED`* | |
| enum |***`cublasGemmAlgo_t`*** |***`hipblasGemmAlgo_t`*** |
| -1 |*`CUBLAS_GEMM_DFALT`* |*`HIPBLAS_GEMM_DEFAULT`* | 160 |
| -1 |*`CUBLAS_GEMM_DEFAULT`* |*`HIPBLAS_GEMM_DEFAULT`* | 160 |
| 0 |*`CUBLAS_GEMM_ALGO0`* | |
| 1 |*`CUBLAS_GEMM_ALGO1`* | |
| 2 |*`CUBLAS_GEMM_ALGO2`* | |
| 3 |*`CUBLAS_GEMM_ALGO3`* | |
| 4 |*`CUBLAS_GEMM_ALGO4`* | |
| 5 |*`CUBLAS_GEMM_ALGO5`* | |
| 6 |*`CUBLAS_GEMM_ALGO6`* | |
| 7 |*`CUBLAS_GEMM_ALGO7`* | |
| 8 |*`CUBLAS_GEMM_ALGO8`* | |
| 9 |*`CUBLAS_GEMM_ALGO9`* | |
| 10 |*`CUBLAS_GEMM_ALGO10`* | |
| 11 |*`CUBLAS_GEMM_ALGO11`* | |
| 12 |*`CUBLAS_GEMM_ALGO12`* | |
| 13 |*`CUBLAS_GEMM_ALGO13`* | |
| 14 |*`CUBLAS_GEMM_ALGO14`* | |
| 15 |*`CUBLAS_GEMM_ALGO15`* | |
| 16 |*`CUBLAS_GEMM_ALGO16`* | |
| 17 |*`CUBLAS_GEMM_ALGO17`* | |
| 18 |*`CUBLAS_GEMM_ALGO18`* | |
| 19 |*`CUBLAS_GEMM_ALGO19`* | |
| 20 |*`CUBLAS_GEMM_ALGO20`* | |
| 21 |*`CUBLAS_GEMM_ALGO21`* | |
| 22 |*`CUBLAS_GEMM_ALGO22`* | |
| 23 |*`CUBLAS_GEMM_ALGO23`* | |
| 99 |*`CUBLAS_GEMM_DEFAULT_TENSOR_OP`* | |
| 99 |*`CUBLAS_GEMM_DFALT_TENSOR_OP`* | |
| 100 |*`CUBLAS_GEMM_ALGO0_TENSOR_OP`* | |
| 101 |*`CUBLAS_GEMM_ALGO1_TENSOR_OP`* | |
| 102 |*`CUBLAS_GEMM_ALGO2_TENSOR_OP`* | |
| 103 |*`CUBLAS_GEMM_ALGO3_TENSOR_OP`* | |
| 104 |*`CUBLAS_GEMM_ALGO4_TENSOR_OP`* | |
| 105 |*`CUBLAS_GEMM_ALGO5_TENSOR_OP`* | |
| 106 |*`CUBLAS_GEMM_ALGO6_TENSOR_OP`* | |
| 107 |*`CUBLAS_GEMM_ALGO7_TENSOR_OP`* | |
| 108 |*`CUBLAS_GEMM_ALGO8_TENSOR_OP`* | |
| 109 |*`CUBLAS_GEMM_ALGO9_TENSOR_OP`* | |
| 110 |*`CUBLAS_GEMM_ALGO10_TENSOR_OP`* | |
| 111 |*`CUBLAS_GEMM_ALGO11_TENSOR_OP`* | |
| 112 |*`CUBLAS_GEMM_ALGO12_TENSOR_OP`* | |
| 113 |*`CUBLAS_GEMM_ALGO13_TENSOR_OP`* | |
| 114 |*`CUBLAS_GEMM_ALGO14_TENSOR_OP`* | |
| 115 |*`CUBLAS_GEMM_ALGO15_TENSOR_OP`* | |
| enum |***`cublasMath_t`*** | |
| 0 |*`CUBLAS_DEFAULT_MATH`* | |
| 1 |*`CUBLAS_TENSOR_OP_MATH`* | |
| enum* |`cublasDataType_t` | |
| struct |`cublasContext` | |
| struct* |`cublasHandle_t` |`hipblasHandle_t` |
| **type** | **CUDA** |**CUDA version\***| **HIP** |**HIP value** (if differs) |
|-------------:|---------------------------------------------------------------|:----------------:|------------------------------------------------------------|---------------------------|
| enum |***`cublasStatus`*** | |***`hipblasStatus_t`*** |
| enum |***`cublasStatus_t`*** | |***`hipblasStatus_t`*** |
| 0 |*`CUBLAS_STATUS_SUCCESS`* | |*`HIPBLAS_STATUS_SUCCESS`* |
| 1 |*`CUBLAS_STATUS_NOT_INITIALIZED`* | |*`HIPBLAS_STATUS_NOT_INITIALIZED`* |
| 3 |*`CUBLAS_STATUS_ALLOC_FAILED`* | |*`HIPBLAS_STATUS_ALLOC_FAILED`* | 2 |
| 7 |*`CUBLAS_STATUS_INVALID_VALUE`* | |*`HIPBLAS_STATUS_INVALID_VALUE`* | 3 |
| 8 |*`CUBLAS_STATUS_ARCH_MISMATCH`* | |*`HIPBLAS_STATUS_ARCH_MISMATCH`* | |
| 11 |*`CUBLAS_STATUS_MAPPING_ERROR`* | |*`HIPBLAS_STATUS_MAPPING_ERROR`* | 4 |
| 13 |*`CUBLAS_STATUS_EXECUTION_FAILED`* | |*`HIPBLAS_STATUS_EXECUTION_FAILED`* | 5 |
| 14 |*`CUBLAS_STATUS_INTERNAL_ERROR`* | |*`HIPBLAS_STATUS_INTERNAL_ERROR`* | 6 |
| 15 |*`CUBLAS_STATUS_NOT_SUPPORTED`* | |*`HIPBLAS_STATUS_NOT_SUPPORTED`* | 7 |
| 16 |*`CUBLAS_STATUS_LICENSE_ERROR`* | | |
| enum |***`cublasOperation_t`*** | |***`hipblasOperation_t`*** |
| 0 |*`CUBLAS_OP_N`* | |*`HIPBLAS_OP_N`* | 111 |
| 1 |*`CUBLAS_OP_T`* | |*`HIPBLAS_OP_T`* | 112 |
| 2 |*`CUBLAS_OP_C`* | |*`HIPBLAS_OP_C`* | 113 |
| 2 |*`CUBLAS_OP_HERMITAN`* | 10.1 |*`HIPBLAS_OP_C`* | 113 |
| 3 |*`CUBLAS_OP_CONJG`* | 10.1 | |
| enum |***`cublasFillMode_t`*** | |***`hipblasFillMode_t`*** |
| 0 |*`CUBLAS_FILL_MODE_LOWER`* | |*`HIPBLAS_FILL_MODE_LOWER`* | 121 |
| 1 |*`CUBLAS_FILL_MODE_UPPER`* | |*`HIPBLAS_FILL_MODE_UPPER`* | 122 |
| 2 |*`CUBLAS_FILL_MODE_FULL`* | 10.1 |*`HIPBLAS_FILL_MODE_FULL`* | 123 |
| enum |***`cublasDiagType_t`*** | |***`hipblasDiagType_t`*** |
| 0 |*`CUBLAS_DIAG_NON_UNIT`* | |*`HIPBLAS_DIAG_NON_UNIT`* | 131 |
| 1 |*`CUBLAS_DIAG_UNIT`* | |*`HIPBLAS_DIAG_UNIT`* | 132 |
| enum |***`cublasSideMode_t`*** | |***`hipblasSideMode_t`*** |
| 0 |*`CUBLAS_SIDE_LEFT`* | |*`HIPBLAS_SIDE_LEFT`* | 141 |
| 1 |*`CUBLAS_SIDE_RIGHT`* | |*`HIPBLAS_SIDE_RIGHT`* | 142 |
| enum |***`cublasPointerMode_t`*** | |***`hipblasPointerMode_t`*** |
| 0 |*`CUBLAS_POINTER_MODE_HOST`* | |*`HIPBLAS_POINTER_MODE_HOST`* |
| 1 |*`CUBLAS_POINTER_MODE_DEVICE`* | |*`HIPBLAS_POINTER_MODE_DEVICE`* |
| enum |***`cublasAtomicsMode_t`*** | | |
| 0 |*`CUBLAS_ATOMICS_NOT_ALLOWED`* | | |
| 1 |*`CUBLAS_ATOMICS_ALLOWED`* | | |
| enum |***`cublasGemmAlgo_t`*** | 8.0 |***`hipblasGemmAlgo_t`*** |
| -1 |*`CUBLAS_GEMM_DFALT`* | 8.0 |*`HIPBLAS_GEMM_DEFAULT`* | 160 |
| -1 |*`CUBLAS_GEMM_DEFAULT`* | 8.0 |*`HIPBLAS_GEMM_DEFAULT`* | 160 |
| 0 |*`CUBLAS_GEMM_ALGO0`* | 8.0 | |
| 1 |*`CUBLAS_GEMM_ALGO1`* | 8.0 | |
| 2 |*`CUBLAS_GEMM_ALGO2`* | 8.0 | |
| 3 |*`CUBLAS_GEMM_ALGO3`* | 8.0 | |
| 4 |*`CUBLAS_GEMM_ALGO4`* | 8.0 | |
| 5 |*`CUBLAS_GEMM_ALGO5`* | 8.0 | |
| 6 |*`CUBLAS_GEMM_ALGO6`* | 8.0 | |
| 7 |*`CUBLAS_GEMM_ALGO7`* | 8.0 | |
| 8 |*`CUBLAS_GEMM_ALGO8`* | 9.0 | |
| 9 |*`CUBLAS_GEMM_ALGO9`* | 9.0 | |
| 10 |*`CUBLAS_GEMM_ALGO10`* | 9.0 | |
| 11 |*`CUBLAS_GEMM_ALGO11`* | 9.0 | |
| 12 |*`CUBLAS_GEMM_ALGO12`* | 9.0 | |
| 13 |*`CUBLAS_GEMM_ALGO13`* | 9.0 | |
| 14 |*`CUBLAS_GEMM_ALGO14`* | 9.0 | |
| 15 |*`CUBLAS_GEMM_ALGO15`* | 9.0 | |
| 16 |*`CUBLAS_GEMM_ALGO16`* | 9.0 | |
| 17 |*`CUBLAS_GEMM_ALGO17`* | 9.0 | |
| 18 |*`CUBLAS_GEMM_ALGO18`* | 9.2 | |
| 19 |*`CUBLAS_GEMM_ALGO19`* | 9.2 | |
| 20 |*`CUBLAS_GEMM_ALGO20`* | 9.2 | |
| 21 |*`CUBLAS_GEMM_ALGO21`* | 9.2 | |
| 22 |*`CUBLAS_GEMM_ALGO22`* | 9.2 | |
| 23 |*`CUBLAS_GEMM_ALGO23`* | 9.2 | |
| 99 |*`CUBLAS_GEMM_DEFAULT_TENSOR_OP`* | 9.0 | |
| 99 |*`CUBLAS_GEMM_DFALT_TENSOR_OP`* | 9.0 | |
| 100 |*`CUBLAS_GEMM_ALGO0_TENSOR_OP`* | 9.0 | |
| 101 |*`CUBLAS_GEMM_ALGO1_TENSOR_OP`* | 9.0 | |
| 102 |*`CUBLAS_GEMM_ALGO2_TENSOR_OP`* | 9.0 | |
| 103 |*`CUBLAS_GEMM_ALGO3_TENSOR_OP`* | 9.0 | |
| 104 |*`CUBLAS_GEMM_ALGO4_TENSOR_OP`* | 9.0 | |
| 105 |*`CUBLAS_GEMM_ALGO5_TENSOR_OP`* | 9.2 | |
| 106 |*`CUBLAS_GEMM_ALGO6_TENSOR_OP`* | 9.2 | |
| 107 |*`CUBLAS_GEMM_ALGO7_TENSOR_OP`* | 9.2 | |
| 108 |*`CUBLAS_GEMM_ALGO8_TENSOR_OP`* | 9.2 | |
| 109 |*`CUBLAS_GEMM_ALGO9_TENSOR_OP`* | 9.2 | |
| 110 |*`CUBLAS_GEMM_ALGO10_TENSOR_OP`* | 9.2 | |
| 111 |*`CUBLAS_GEMM_ALGO11_TENSOR_OP`* | 9.2 | |
| 112 |*`CUBLAS_GEMM_ALGO12_TENSOR_OP`* | 9.2 | |
| 113 |*`CUBLAS_GEMM_ALGO13_TENSOR_OP`* | 9.2 | |
| 114 |*`CUBLAS_GEMM_ALGO14_TENSOR_OP`* | 9.2 | |
| 115 |*`CUBLAS_GEMM_ALGO15_TENSOR_OP`* | 9.2 | |
| enum |***`cublasMath_t`*** | 9.0 | |
| 0 |*`CUBLAS_DEFAULT_MATH`* | 9.0 | |
| 1 |*`CUBLAS_TENSOR_OP_MATH`* | 9.0 | |
| enum* |`cublasDataType_t` | 7.5 | |
| struct |`cublasContext` | | |
| struct* |`cublasHandle_t` | |`hipblasHandle_t` |
## **2. CUBLAS API functions**
| **CUDA** | **HIP** |
|-----------------------------------------------------------|-------------------------------------------------|
| **CUDA** | **HIP** |**CUDA version\***|
|-----------------------------------------------------------|-------------------------------------------------|:----------------:|
|`cublasCreate` |`hipblasCreate` |
|`cublasCreate_v2` |`hipblasCreate` |
|`cublasDestroy` |`hipblasDestroy` |
|`cublasDestroy_v2` |`hipblasDestroy` |
|`cublasGetVersion` | |
|`cublasGetVersion_v2` | |
|`cublasGetProperty` | |
|`cublasGetCudartVersion` | |
|`cublasGetProperty` | | 8.0 |
|`cublasGetCudartVersion` | | 10.1 |
|`cublasGetStream` |`hipblasGetStream` |
|`cublasGetStream_v2` |`hipblasGetStream` |
|`cublasSetStream` |`hipblasSetStream` |
@@ -112,12 +112,12 @@
|`cublasSetPointerMode_v2` |`hipblasSetPointerMode` |
|`cublasGetAtomicsMode` | |
|`cublasSetAtomicsMode` | |
|`cublasGetMathMode` | |
|`cublasSetMathMode` | |
|`cublasLogCallback` | |
|`cublasLoggerConfigure` | |
|`cublasSetLoggerCallback` | |
|`cublasGetLoggerCallback` | |
|`cublasGetMathMode` | | 9.0 |
|`cublasSetMathMode` | | 9.0 |
|`cublasLogCallback` | | 9.2 |
|`cublasLoggerConfigure` | | 9.2 |
|`cublasSetLoggerCallback` | | 9.2 |
|`cublasGetLoggerCallback` | | 9.2 |
|`cublasSetVector` |`hipblasSetVector` |
|`cublasGetVector` |`hipblasGetVector` |
|`cublasSetMatrix` |`hipblasSetMatrix` |
@@ -127,7 +127,7 @@
|`cublasSetMatrixAsync` | |
|`cublasGetMatrixAsync` | |
|`cublasXerbla` | |
|`cublasNrm2Ex` | |
|`cublasNrm2Ex` | | 8.0 |
|`cublasSnrm2` |`hipblasSnrm2` |
|`cublasSnrm2_v2` |`hipblasSnrm2` |
|`cublasDnrm2` |`hipblasDnrm2` |
@@ -136,8 +136,8 @@
|`cublasScnrm2_v2` | |
|`cublasDznrm2` | |
|`cublasDznrm2_v2` | |
|`cublasDotEx` | |
|`cublasDotcEx` | |
|`cublasDotEx` | | 8.0 |
|`cublasDotcEx` | | 8.0 |
|`cublasSdot` |`hipblasSdot` |
|`cublasSdot_v2` |`hipblasSdot` |
|`cublasDdot` |`hipblasDdot` |
@@ -150,7 +150,7 @@
|`cublasZdotu_v2` | |
|`cublasZdotc` | |
|`cublasZdotc_v2` | |
|`cublasScalEx` | |
|`cublasScalEx` | | 8.0 |
|`cublasSscal` |`hipblasSscal` |
|`cublasSscal_v2` |`hipblasSscal` |
|`cublasDscal` |`hipblasDscal` |
@@ -163,7 +163,7 @@
|`cublasZscal_v2` | |
|`cublasZdscal` | |
|`cublasZdscal_v2` | |
|`cublasAxpyEx` | |
|`cublasAxpyEx` | | 8.0 |
|`cublasSaxpy` |`hipblasSaxpy` |
|`cublasSaxpy_v2` |`hipblasSaxpy` |
|`cublasDaxpy` |`hipblasDaxpy` |
@@ -177,7 +177,7 @@
|`cublasDcopy` |`hipblasDcopy` |
|`cublasDcopy_v2` |`hipblasDcopy` |
|`cublasCcopy` | |
|`cublasCopyEx` | |
|`cublasCopyEx` | | 10.1 |
|`cublasCcopy_v2` | |
|`cublasZcopy` | |
|`cublasZcopy_v2` | |
@@ -189,7 +189,7 @@
|`cublasCswap_v2` | |
|`cublasZswap` | |
|`cublasZswap_v2` | |
|`cublasIamaxEx` | |
|`cublasIamaxEx` | | 10.1 |
|`cublasIsamax` |`hipblasIsamax` |
|`cublasIsamax_v2` |`hipblasIsamax` |
|`cublasIdamax` |`hipblasIdamax` |
@@ -198,7 +198,7 @@
|`cublasIcamax_v2` | |
|`cublasIzamax` | |
|`cublasIzamax_v2` | |
|`cublasIaminEx` | |
|`cublasIaminEx` | | 10.1 |
|`cublasIsamin` | |
|`cublasIsamin_v2` | |
|`cublasIdamin` | |
@@ -207,7 +207,7 @@
|`cublasIcamin_v2` | |
|`cublasIzamin` | |
|`cublasIzamin_v2` | |
|`cublasAsumEx` | |
|`cublasAsumEx` | | 10.1 |
|`cublasSasum` |`hipblasSasum` |
|`cublasSasum_v2` |`hipblasSasum` |
|`cublasDasum` |`hipblasDasum` |
@@ -216,7 +216,7 @@
|`cublasScasum_v2` | |
|`cublasDzasum` | |
|`cublasDzasum_v2` | |
|`cublasRotEx` | |
|`cublasRotEx` | | 10.1 |
|`cublasSrot` | |
|`cublasSrot_v2` | |
|`cublasDrot` | |
@@ -225,7 +225,7 @@
|`cublasCrot_v2` | |
|`cublasZrot` | |
|`cublasZrot_v2` | |
|`cublasRotgEx` | |
|`cublasRotgEx` | | 10.1 |
|`cublasZdrot` | |
|`cublasZdrot_v2` | |
|`cublasSrotg` | |
@@ -236,12 +236,12 @@
|`cublasCrotg_v2` | |
|`cublasZrotg` | |
|`cublasZrotg_v2` | |
|`cublasRotmEx` | |
|`cublasRotmEx` | | 10.1 |
|`cublasSrotm` | |
|`cublasSrotm_v2` | |
|`cublasDrotm` | |
|`cublasDrotm_v2` | |
|`cublasRotmgEx` | |
|`cublasRotmgEx` | | 10.1 |
|`cublasSrotmg` | |
|`cublasSrotmg_v2` | |
|`cublasDrotmg` | |
@@ -396,16 +396,16 @@
|`cublasDgemm_v2` |`hipblasDgemm` |
|`cublasCgemm` | |
|`cublasCgemm_v2` | |
|`cublasCgemm3m` | |
|`cublasCgemm3mEx` | |
|`cublasCgemm3m` | | 8.0 |
|`cublasCgemm3mEx` | | 8.0 |
|`cublasZgemm` | |
|`cublasZgemm_v2` | |
|`cublasZgemm3m` | |
|`cublasHgemm` |`hipblasHgemm` |
|`cublasSgemmEx` | |
|`cublasGemmEx` |`hipblasGemmEx` |
|`cublasCgemmEx` | |
|`cublasUint8gemmBias` | |
|`cublasZgemm3m` | | 8.0 |
|`cublasHgemm` |`hipblasHgemm` | 7.5 |
|`cublasSgemmEx` | | 7.5 |
|`cublasGemmEx` |`hipblasGemmEx` | 8.0 |
|`cublasCgemmEx` | | 8.0 |
|`cublasUint8gemmBias` | | 8.0 |
|`cublasSsyrk` | |
|`cublasSsyrk_v2` | |
|`cublasDsyrk` | |
@@ -414,14 +414,14 @@
|`cublasCsyrk_v2` | |
|`cublasZsyrk` | |
|`cublasZsyrk_v2` | |
|`cublasCsyrkEx` | |
|`cublasCsyrk3mEx` | |
|`cublasCsyrkEx` | | 8.0 |
|`cublasCsyrk3mEx` | | 8.0 |
|`cublasCherk` | |
|`cublasCherk_v2` | |
|`cublasZherk` | |
|`cublasZherk_v2` | |
|`cublasCherkEx` | |
|`cublasCherk3mEx` | |
|`cublasCherkEx` | | 8.0 |
|`cublasCherk3mEx` | | 8.0 |
|`cublasSsyr2k` | |
|`cublasSsyr2k_v2` | |
|`cublasDsyr2k` | |
@@ -468,20 +468,20 @@
|`cublasCtrmm_v2` | |
|`cublasZtrmm` | |
|`cublasZtrmm_v2` | |
|`cublasHgemmBatched` | |
|`cublasHgemmBatched` | | 9.0 |
|`cublasSgemmBatched` |`hipblasSgemmBatched` |
|`cublasDgemmBatched` |`hipblasDgemmBatched` |
|`cublasCgemmBatched` | |
|`cublasCgemm3mBatched` | |
|`cublasCgemm3mBatched` | | 8.0 |
|`cublasZgemmBatched` | |
|`cublasGemmBatchedEx` | |
|`cublasGemmStridedBatchedEx` | |
|`cublasSgemmStridedBatched` |`hipblasSgemmStridedBatched` |
|`cublasDgemmStridedBatched` |`hipblasDgemmStridedBatched` |
|`cublasCgemmStridedBatched` | |
|`cublasCgemm3mStridedBatched` | |
|`cublasZgemmStridedBatched` | |
|`cublasHgemmStridedBatched` | |
|`cublasGemmBatchedEx` | | 9.1 |
|`cublasGemmStridedBatchedEx` | | 9.1 |
|`cublasSgemmStridedBatched` |`hipblasSgemmStridedBatched` | 8.0 |
|`cublasDgemmStridedBatched` |`hipblasDgemmStridedBatched` | 8.0 |
|`cublasCgemmStridedBatched` | | 8.0 |
|`cublasCgemm3mStridedBatched` | | 8.0 |
|`cublasZgemmStridedBatched` | | 8.0 |
|`cublasHgemmStridedBatched` | | 8.0 |
|`cublasSgeam` |`hipblasSgeam` |
|`cublasDgeam` |`hipblasDgeam` |
|`cublasCgeam` | |
@@ -526,3 +526,5 @@
|`cublasDtrttp` | |
|`cublasCtrttp` | |
|`cublasZtrttp` | |
\* CUDA version, in which API has appeared and (optional) last version before abandoning it; no value in case of earlier versions < 7.5.
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다. Diff 로드
+45 -45
파일 보기
@@ -2,51 +2,51 @@
## **1. CUFFT Data types**
| **type** | **CUDA** | **HIP** |**HIP value** (if differs) |
|-------------:|---------------------------------------------------------------|------------------------------------------------------------|---------------------------|
| enum |***`cufftResult_t`*** |***`hipfftResult_t`*** |
| enum |***`cufftResult`*** |***`hipfftResult`*** |
| 0x0 |*`CUFFT_SUCCESS`* |*`HIPFFT_SUCCESS`* | 0 |
| 0x1 |*`CUFFT_INVALID_PLAN`* |*`HIPFFT_INVALID_PLAN`* | 1 |
| 0x2 |*`CUFFT_ALLOC_FAILED`* |*`HIPFFT_ALLOC_FAILED`* | 2 |
| 0x3 |*`CUFFT_INVALID_TYPE`* |*`HIPFFT_INVALID_TYPE`* | 3 |
| 0x4 |*`CUFFT_INVALID_VALUE`* |*`HIPFFT_INVALID_VALUE`* | 4 |
| 0x5 |*`CUFFT_INTERNAL_ERROR`* |*`HIPFFT_INTERNAL_ERROR`* | 5 |
| 0x6 |*`CUFFT_EXEC_FAILED`* |*`HIPFFT_EXEC_FAILED`* | 6 |
| 0x7 |*`CUFFT_SETUP_FAILED`* |*`HIPFFT_SETUP_FAILED`* | 7 |
| 0x8 |*`CUFFT_I;NVALID_SIZE`* |*`HIPFFT_INVALID_SIZE`* | 8 |
| 0x9 |*`CUFFT_UNALIGNED_DATA`* |*`HIPFFT_UNALIGNED_DATA`* | 9 |
| 0xA |*`CUFFT_INCOMPLETE_PARAMETER_LIST`* |*`HIPFFT_INCOMPLETE_PARAMETER_LIST`* | 10 |
| 0xB |*`CUFFT_INVALID_DEVICE`* |*`HIPFFT_INVALID_DEVICE`* | 11 |
| 0xC |*`CUFFT_PARSE_ERROR`* |*`HIPFFT_PARSE_ERROR`* | 12 |
| 0xD |*`CUFFT_NO_WORKSPACE`* |*`HIPFFT_NO_WORKSPACE`* | 13 |
| 0xE |*`CUFFT_NOT_IMPLEMENTED`* |*`HIPFFT_NOT_IMPLEMENTED`* | 14 |
| 0xF |*`CUFFT_LICENSE_ERROR`* | |
| 0x10 |*`CUFFT_NOT_SUPPORTED`* |*`HIPFFT_NOT_SUPPORTED`* | 16 |
| float |***`cufftReal`*** |***`hipfftReal`*** |
| double |***`cufftDoubleReal`*** |***`hipfftDoubleReal`*** |
| float2 |***`cufftComplex`*** |***`hipfftComplex`*** |
| double2 |***`cufftDoubleComplex`*** |***`hipfftDoubleComplex`*** |
| define |`CUFFT_FORWARD` |`HIPFFT_FORWARD` |
| define |`CUFFT_INVERSE` |`HIPFFT_BACKWARD` |
| enum |***`cufftType_t`*** |***`hipfftType_t`*** |
| enum |***`cufftType`*** |***`hipfftType`*** |
| 0x2a |*`CUFFT_R2C`* |*`HIPFFT_R2C`* |
| 0x2c |*`CUFFT_C2R`* |*`HIPFFT_C2R`* |
| 0x29 |*`CUFFT_C2C`* |*`HIPFFT_C2C`* |
| 0x6a |*`CUFFT_D2Z`* |*`HIPFFT_D2Z`* |
| 0x6c |*`CUFFT_Z2D`* |*`HIPFFT_Z2D`* |
| 0x69 |*`CUFFT_Z2Z`* |*`HIPFFT_Z2Z`* |
| enum |***`cufftCompatibility_t`*** | |
| enum |***`cufftCompatibility`*** | |
| 0x01 |*`CUFFT_COMPATIBILITY_FFTW_PADDING`* | |
| define |`CUFFT_COMPATIBILITY_DEFAULT` | |
| int |***`cufftHandle`*** |***`hipfftHandle`*** |
| **type** | **CUDA** |**CUDA version\***| **HIP** |**HIP value** (if differs) |
|-------------:|---------------------------------------------------------------|:----------------:|------------------------------------------------------------|---------------------------|
| enum |***`cufftResult_t`*** | |***`hipfftResult_t`*** |
| enum |***`cufftResult`*** | |***`hipfftResult`*** |
| 0x0 |*`CUFFT_SUCCESS`* | |*`HIPFFT_SUCCESS`* | 0 |
| 0x1 |*`CUFFT_INVALID_PLAN`* | |*`HIPFFT_INVALID_PLAN`* | 1 |
| 0x2 |*`CUFFT_ALLOC_FAILED`* | |*`HIPFFT_ALLOC_FAILED`* | 2 |
| 0x3 |*`CUFFT_INVALID_TYPE`* | |*`HIPFFT_INVALID_TYPE`* | 3 |
| 0x4 |*`CUFFT_INVALID_VALUE`* | |*`HIPFFT_INVALID_VALUE`* | 4 |
| 0x5 |*`CUFFT_INTERNAL_ERROR`* | |*`HIPFFT_INTERNAL_ERROR`* | 5 |
| 0x6 |*`CUFFT_EXEC_FAILED`* | |*`HIPFFT_EXEC_FAILED`* | 6 |
| 0x7 |*`CUFFT_SETUP_FAILED`* | |*`HIPFFT_SETUP_FAILED`* | 7 |
| 0x8 |*`CUFFT_INVALID_SIZE`* | |*`HIPFFT_INVALID_SIZE`* | 8 |
| 0x9 |*`CUFFT_UNALIGNED_DATA`* | |*`HIPFFT_UNALIGNED_DATA`* | 9 |
| 0xA |*`CUFFT_INCOMPLETE_PARAMETER_LIST`* | |*`HIPFFT_INCOMPLETE_PARAMETER_LIST`* | 10 |
| 0xB |*`CUFFT_INVALID_DEVICE`* | |*`HIPFFT_INVALID_DEVICE`* | 11 |
| 0xC |*`CUFFT_PARSE_ERROR`* | |*`HIPFFT_PARSE_ERROR`* | 12 |
| 0xD |*`CUFFT_NO_WORKSPACE`* | |*`HIPFFT_NO_WORKSPACE`* | 13 |
| 0xE |*`CUFFT_NOT_IMPLEMENTED`* | |*`HIPFFT_NOT_IMPLEMENTED`* | 14 |
| 0xF |*`CUFFT_LICENSE_ERROR`* | | |
| 0x10 |*`CUFFT_NOT_SUPPORTED`* | 8.0 |*`HIPFFT_NOT_SUPPORTED`* | 16 |
| float |***`cufftReal`*** | |***`hipfftReal`*** |
| double |***`cufftDoubleReal`*** | |***`hipfftDoubleReal`*** |
| float2 |***`cufftComplex`*** | |***`hipfftComplex`*** |
| double2 |***`cufftDoubleComplex`*** | |***`hipfftDoubleComplex`*** |
| define |`CUFFT_FORWARD` | |`HIPFFT_FORWARD` |
| define |`CUFFT_INVERSE` | |`HIPFFT_BACKWARD` |
| enum |***`cufftType_t`*** | |***`hipfftType_t`*** |
| enum |***`cufftType`*** | |***`hipfftType`*** |
| 0x2a |*`CUFFT_R2C`* | |*`HIPFFT_R2C`* |
| 0x2c |*`CUFFT_C2R`* | |*`HIPFFT_C2R`* |
| 0x29 |*`CUFFT_C2C`* | |*`HIPFFT_C2C`* |
| 0x6a |*`CUFFT_D2Z`* | |*`HIPFFT_D2Z`* |
| 0x6c |*`CUFFT_Z2D`* | |*`HIPFFT_Z2D`* |
| 0x69 |*`CUFFT_Z2Z`* | |*`HIPFFT_Z2Z`* |
| enum |***`cufftCompatibility_t`*** | | |
| enum |***`cufftCompatibility`*** | | |
| 0x01 |*`CUFFT_COMPATIBILITY_FFTW_PADDING`* | | |
| define |`CUFFT_COMPATIBILITY_DEFAULT` | | |
| int |***`cufftHandle`*** | |***`hipfftHandle`*** |
## **2. CUFFT API functions**
| **CUDA** | **HIP** |
|-----------------------------------------------------------|-------------------------------------------------|
| **CUDA** | **HIP** |**CUDA version\***|
|-----------------------------------------------------------|-------------------------------------------------|:----------------:|
|`cufftPlan1d` |`hipfftPlan1d` |
|`cufftPlan2d` |`hipfftPlan2d` |
|`cufftPlan3d` |`hipfftPlan3d` |
@@ -55,8 +55,8 @@
|`cufftMakePlan2d` |`hipfftMakePlan2d` |
|`cufftMakePlan3d` |`hipfftMakePlan3d` |
|`cufftMakePlanMany` |`hipfftMakePlanMany` |
|`cufftMakePlanMany64` |`hipfftMakePlanMany64` |
|`cufftGetSizeMany64` |`hipfftGetSizeMany64` |
|`cufftMakePlanMany64` |`hipfftMakePlanMany64` | 7.5 |
|`cufftGetSizeMany64` |`hipfftGetSizeMany64` | 7.5 |
|`cufftEstimate1d` |`hipfftEstimate1d` |
|`cufftEstimate2d` |`hipfftEstimate2d` |
|`cufftEstimate3d` |`hipfftEstimate3d` |
@@ -78,4 +78,4 @@
|`cufftSetStream` |`hipfftSetStream` |
|`cufftDestroy` |`hipfftDestroy` |
|`cufftGetVersion` |`hipfftGetVersion` |
|`cufftGetProperty` | |
|`cufftGetProperty` | | 8.0 |
+73 -69
파일 보기
@@ -32,11 +32,11 @@
## <a name="dependencies"></a> Dependencies
`hipify-clang` requires:
1. [**LLVM+CLANG**](http://releases.llvm.org) of at least version [3.8.0](http://releases.llvm.org/download.html#3.8.0); the latest stable and recommended release: [**6.0.1**](http://releases.llvm.org/download.html#6.0.1) on **Windows**, and [**8.0.0**](http://releases.llvm.org/download.html#8.0.0) on **Linux**.
1. [**LLVM+CLANG**](http://releases.llvm.org) of at least version [3.8.0](http://releases.llvm.org/download.html#3.8.0); the latest stable and recommended release: [**6.0.1**](http://releases.llvm.org/download.html#6.0.1) on **Windows**, and [**8.0.1**](http://releases.llvm.org/download.html#8.0.1) on **Linux**.
2. **CUDA** at least version [7.0](https://developer.nvidia.com/cuda-toolkit-70), the latest supported version is [**9.0**](https://developer.nvidia.com/cuda-90-download-archive) on **Windows**, and [**10.0**](https://developer.nvidia.com/cuda-10.0-download-archive) on **Linux**.
If the target CUDA is [9.1](https://developer.nvidia.com/cuda-91-download-archive), [9.2](https://developer.nvidia.com/cuda-92-download-archive) or [10.0](https://developer.nvidia.com/cuda-10.0-download-archive), to work on Windows you may apply patches*: [for LLVM 7.0.0](patches/patch_for_clang_7.0.0_bug_38811.zip), [for LLVM 7.0.1](patches/patch_for_clang_7.0.1_bug_38811.zip), [for LLVM 8.0.0](patches/patch_for_clang_8.0.0_bug_38811.zip).
If the target CUDA is [9.1](https://developer.nvidia.com/cuda-91-download-archive), [9.2](https://developer.nvidia.com/cuda-92-download-archive) or [10.0](https://developer.nvidia.com/cuda-10.0-download-archive), to work on Windows you may apply patches* for LLVM: [7.0.0](patches/patch_for_clang_7.0.0_bug_38811.zip), [7.0.1](patches/patch_for_clang_7.0.1_bug_38811.zip), [7.1.0](patches/patch_for_clang_7.1.0_bug_38811.zip), [8.0.0](patches/patch_for_clang_8.0.0_bug_38811.zip), [8.0.1](patches/patch_for_clang_8.0.1_bug_38811.zip).
| **LLVM release version** | **CUDA latest supported version** | **Windows** | **Linux** |
|:----------------------------------------------------------:|:-------------------------------------------------------------------:|:------------:|:---------:|
@@ -54,8 +54,9 @@ If the target CUDA is [9.1](https://developer.nvidia.com/cuda-91-download-archiv
| [7.0.0](http://releases.llvm.org/download.html#7.0.0) | [9.2](https://developer.nvidia.com/cuda-92-download-archive) | - <br/> not working due to <br/> the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811) <br/>+<br/>[patch](patches/patch_for_clang_7.0.0_bug_38811.zip)*</br> | - <br/> not working due to <br/> the clang's bug [36384](https://bugs.llvm.org/show_bug.cgi?id=36384) |
| [7.0.1](http://releases.llvm.org/download.html#7.0.1) | [9.2](https://developer.nvidia.com/cuda-92-download-archive) | - <br/> not working due to <br/> the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811) <br/>+<br/>[patch](patches/patch_for_clang_7.0.1_bug_38811.zip)*</br> | - <br/> not working due to <br/> the clang's bug [36384](https://bugs.llvm.org/show_bug.cgi?id=36384) |
| [7.1.0](http://releases.llvm.org/download.html#7.1.0) | [9.2](https://developer.nvidia.com/cuda-92-download-archive) | - <br/> not working due to <br/> the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811) <br/>+<br/>[patch](patches/patch_for_clang_7.1.0_bug_38811.zip)*</br> | - <br/> not working due to <br/> the clang's bug [36384](https://bugs.llvm.org/show_bug.cgi?id=36384) |
| [**8.0.0**](http://releases.llvm.org/download.html#8.0.0) | [**10.0**](https://developer.nvidia.com/cuda-10.0-download-archive) | - <br/> not working due to <br/> the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811) <br/>+<br/>[patch](patches/patch_for_clang_8.0.0_bug_38811.zip)*</br> | + <br/> **LATEST STABLE RELEASE** |
| 8.0.1 | 10.2 | - <br/> LLVM 8.0.1 <br/> is not yet released | - <br/> LLVM 8.0.1 <br/> is not yet released |
| [8.0.0](http://releases.llvm.org/download.html#8.0.0) | [10.0](https://developer.nvidia.com/cuda-10.0-download-archive) | - <br/> not working due to <br/> the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811) <br/>+<br/>[patch](patches/patch_for_clang_8.0.0_bug_38811.zip)*</br> | + |
| [**8.0.1**](http://releases.llvm.org/download.html#8.0.1) | [**10.0**](https://developer.nvidia.com/cuda-10.0-download-archive) | - <br/> not working due to <br/> the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811) <br/>+<br/>[patch](patches/patch_for_clang_8.0.1_bug_38811.zip)*</br> | + <br/> **LATEST STABLE RELEASE** |
| 9.0.0 | 10.1 | <br/> LLVM 9.0.0 <br/> is not yet released | <br/> LLVM 9.0.0 <br/> is not yet released |
`*` Download the patch and unpack it into your LLVM distributive directory; a few header files will be overwritten; rebuilding of LLVM is not needed.
@@ -152,13 +153,13 @@ To run it:
* Install `lit` into `python`:
- Linux: `python /srv/git/LLVM/8.0.0/llvm/utils/lit/setup.py install`
- Linux: `python /srv/git/LLVM/8.0.1/llvm/utils/lit/setup.py install`
- Windows: `python f:/LLVM/6.0.1/llvm/utils/lit/setup.py install`
* Starting with LLVM 6.0.1 path to `llvm-lit` python script should be specified by the `LLVM_EXTERNAL_LIT` option:
- Linux: `-DLLVM_EXTERNAL_LIT=/srv/git/LLVM/8.0.0/build/bin/llvm-lit`
- Linux: `-DLLVM_EXTERNAL_LIT=/srv/git/LLVM/8.0.1/build/bin/llvm-lit`
- Windows: `-DLLVM_EXTERNAL_LIT=f:/LLVM/6.0.1/build/Release/bin/llvm-lit.py`
@@ -180,7 +181,7 @@ On Linux the following configurations are tested:
Ubuntu 14: LLVM 5.0.0 - 6.0.1, CUDA 7.0 - 9.0, cudnn-5.0.5 - cudnn-7.6.1.34
Ubuntu 16-18: LLVM 8.0.0, CUDA 8.0 - 10.0, cudnn-5.1.10 - cudnn-7.6.1.34
Ubuntu 16-18: LLVM 8.0.0 - 8.0.1, CUDA 8.0 - 10.0, cudnn-5.1.10 - cudnn-7.6.1.34
Build system for the above configurations:
@@ -193,10 +194,10 @@ cmake
-DHIPIFY_CLANG_TESTS=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../dist \
-DCMAKE_PREFIX_PATH=/srv/git/LLVM/8.0.0/dist \
-DCMAKE_PREFIX_PATH=/srv/git/LLVM/8.0.1/dist \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.0 \
-DCUDA_DNN_ROOT_DIR=/srv/CUDNN/cudnn-10.0-v7.6.1.34 \
-DLLVM_EXTERNAL_LIT=/srv/git/LLVM/8.0.0/build/bin/llvm-lit \
-DLLVM_EXTERNAL_LIT=/srv/git/LLVM/8.0.1/build/bin/llvm-lit \
..
```
*A corresponding successful output:*
@@ -215,14 +216,14 @@ cmake
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found LLVM 8.0.0:
-- - CMake module path: /srv/git/LLVM/8.0.0/dist/lib/cmake/llvm
-- - Include path : /srv/git/LLVM/8.0.0/dist/include
-- - Binary path : /srv/git/LLVM/8.0.0/dist/bin
-- Found LLVM 8.0.1:
-- - CMake module path: /srv/git/LLVM/8.0.1/dist/lib/cmake/llvm
-- - Include path : /srv/git/LLVM/8.0.1/dist/include
-- - Binary path : /srv/git/LLVM/8.0.1/dist/bin
-- Linker detection: GNU ld
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")
-- Found lit: /usr/local/bin/lit
-- Found FileCheck: /srv/git/LLVM/8.0.0/dist/bin/FileCheck
-- Found FileCheck: /srv/git/LLVM/8.0.1/dist/bin/FileCheck
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
@@ -245,64 +246,67 @@ make test-hipify
Running HIPify regression tests
========================================
CUDA 10.0 - will be used for testing
LLVM 8.0.0 - will be used for testing
LLVM 8.0.1 - will be used for testing
x86_64 - Platform architecture
Linux 4.13.0-32-generic - Platform OS
64 - hipify-clang binary bitness
64 - python 2.7.12 binary bitness
========================================
-- Testing: 49 tests, 12 threads --
PASS: hipify :: unit_tests/headers/headers_test_01.cu (1 of 49)
PASS: hipify :: unit_tests/headers/headers_test_03.cu (2 of 49)
PASS: hipify :: unit_tests/headers/headers_test_02.cu (3 of 49)
PASS: hipify :: unit_tests/headers/headers_test_05.cu (4 of 49)
PASS: hipify :: unit_tests/headers/headers_test_06.cu (5 of 49)
PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu (6 of 49)
PASS: hipify :: unit_tests/headers/headers_test_07.cu (7 of 49)
PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_02.cu (8 of 49)
PASS: hipify :: unit_tests/headers/headers_test_04.cu (9 of 49)
PASS: hipify :: unit_tests/headers/headers_test_08.cu (10 of 49)
PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu (11 of 49)
PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu (12 of 49)
PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu (13 of 49)
PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_0_based_indexing_rocblas.cu (14 of 49)
PASS: hipify :: unit_tests/libraries/cuComplex/cuComplex_Julia.cu (15 of 49)
PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_softmax.cu (16 of 49)
PASS: hipify :: unit_tests/libraries/cuFFT/simple_cufft.cu (17 of 49)
PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu (18 of 49)
PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_01.cu (19 of 49)
PASS: hipify :: unit_tests/libraries/cuRAND/poisson_api_example.cu (20 of 49)
PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu (21 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu (22 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu (23 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu (24 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu (25 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu (26 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu (27 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu (28 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu (29 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu (30 of 49)
PASS: hipify :: unit_tests/headers/headers_test_09.cu (31 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu (32 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu (33 of 49)
PASS: hipify :: unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp (34 of 49)
PASS: hipify :: unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp (35 of 49)
PASS: hipify :: unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp (36 of 49)
PASS: hipify :: unit_tests/samples/allocators.cu (37 of 49)
PASS: hipify :: unit_tests/samples/coalescing.cu (38 of 49)
PASS: hipify :: unit_tests/samples/dynamic_shared_memory.cu (39 of 49)
PASS: hipify :: unit_tests/samples/intro.cu (40 of 49)
PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp (41 of 49)
PASS: hipify :: unit_tests/samples/2_Cookbook/7_streams/stream.cpp (42 of 49)
PASS: hipify :: unit_tests/samples/square.cu (43 of 49)
PASS: hipify :: unit_tests/samples/static_shared_memory.cu (44 of 49)
PASS: hipify :: unit_tests/samples/axpy.cu (45 of 49)
PASS: hipify :: unit_tests/samples/vec_add.cu (46 of 49)
PASS: hipify :: unit_tests/samples/cudaRegister.cu (47 of 49)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu (48 of 49)
PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp (49 of 49)
Testing Time: 2.82s
Expected Passes : 49
-- Testing: 52 tests, 12 threads --
PASS: hipify :: unit_tests/headers/headers_test_03.cu (1 of 52)
PASS: hipify :: unit_tests/headers/headers_test_02.cu (2 of 52)
PASS: hipify :: unit_tests/headers/headers_test_01.cu (3 of 52)
PASS: hipify :: unit_tests/headers/headers_test_05.cu (4 of 52)
PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_02.cu (5 of 52)
PASS: hipify :: unit_tests/headers/headers_test_07.cu (6 of 52)
PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu (7 of 52)
PASS: hipify :: unit_tests/headers/headers_test_06.cu (8 of 52)
PASS: hipify :: unit_tests/headers/headers_test_04.cu (9 of 52)
PASS: hipify :: unit_tests/headers/headers_test_08.cu (10 of 52)
PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu (11 of 52)
PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_0_based_indexing_rocblas.cu (12 of 52)
PASS: hipify :: unit_tests/libraries/cuComplex/cuComplex_Julia.cu (13 of 52)
PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu (14 of 52)
PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu (15 of 52)
PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_softmax.cu (16 of 52)
PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu (17 of 52)
PASS: hipify :: unit_tests/libraries/cuFFT/simple_cufft.cu (18 of 52)
PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_01.cu (19 of 52)
PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu (20 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu (21 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu (22 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu (23 of 52)
PASS: hipify :: unit_tests/libraries/cuRAND/poisson_api_example.cu (24 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu (25 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu (26 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu (27 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu (28 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp (29 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu (30 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu (31 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu (32 of 52)
PASS: hipify :: unit_tests/headers/headers_test_09.cu (33 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu (34 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp (35 of 52)
PASS: hipify :: unit_tests/samples/allocators.cu (36 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp (37 of 52)
PASS: hipify :: unit_tests/samples/coalescing.cu (38 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp (39 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp (40 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/7_streams/stream.cpp (41 of 52)
PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp (42 of 52)
PASS: hipify :: unit_tests/samples/axpy.cu (43 of 52)
PASS: hipify :: unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp (44 of 52)
PASS: hipify :: unit_tests/samples/dynamic_shared_memory.cu (45 of 52)
PASS: hipify :: unit_tests/samples/intro.cu (46 of 52)
PASS: hipify :: unit_tests/samples/square.cu (47 of 52)
PASS: hipify :: unit_tests/samples/cudaRegister.cu (48 of 52)
PASS: hipify :: unit_tests/samples/vec_add.cu (49 of 52)
PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu (50 of 52)
PASS: hipify :: unit_tests/samples/static_shared_memory.cu (51 of 52)
PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp (52 of 52)
Testing Time: 3.05s
Expected Passes : 52
[100%] Built target test-hipify
```
### <a name="windows"></a >Windows
@@ -313,11 +317,11 @@ LLVM 5.0.0 - 5.0.2, CUDA 8.0, cudnn-5.1.10 - cudnn-7.1.4.18
LLVM 6.0.0 - 6.0.1, CUDA 9.0, cudnn-7.0.5.15 - cudnn-7.6.1.34
LLVM 7.0.0 - 8.0.0 (with patch*), CUDA 7.5 - 10.0, cudnn-7.0.5.15 - cudnn-7.6.1.34
LLVM 7.0.0 - 8.0.1 (with patch*), CUDA 7.5 - 10.0, cudnn-7.0.5.15 - cudnn-7.6.1.34
Build system for the above configurations:
Python 3.6 (min), cmake 3.12.3 (min), Visual Studio 15.5.2 2017 - 16.0.4 2019.
Python 3.6 (min), cmake 3.12.3 (min), Visual Studio 15.5.2 2017 - 16.1.6 2019.
Here is an example of building `hipify-clang` with testing support on `Windows 10` by `Visual Studio 15 2017`:
바이너리 파일은 표시되지 않음.
+1 -1
파일 보기
@@ -23,7 +23,7 @@ inline clara::Parser cmdline_parser(bool& help, std::vector<std::string>& inputs
"https://reviews.llvm.org/D13909; "
"the code object format is documented at: "
"https://www.llvm.org/docs/AMDGPUUsage.html#code-object.") |
clara::Opt{targets, "gfx803,gfx900,gfx906 etc."}["-t"]["--targets"](
clara::Opt{targets, "gfx803,gfx900,gfx906,gfx908 etc."}["-t"]["--targets"](
"targets for which code objects are to be extracted from "
"the fat binary; must be included in the set of processors "
"with ROCm support from "
+1 -1
파일 보기
@@ -12,7 +12,7 @@ namespace hip_impl {
inline const std::unordered_set<std::string>& amdgpu_targets() { // The evolving list lives at:
// https://www.llvm.org/docs/AMDGPUUsage.html#processors.
static const std::unordered_set<std::string> r{"gfx701", "gfx801", "gfx802", "gfx803",
"gfx900", "gfx906"};
"gfx900", "gfx906", "gfx908"};
return r;
}
+1 -1
파일 보기
@@ -132,7 +132,7 @@ inline clara::Parser cmdline_parser(bool& help, std::vector<std::string>& source
"file is documented at: https://reviews.llvm.org/D13909.") |
clara::Arg{sources,
"a.cpp b.cpp etc."}("inputs for compilation; must contain valid C++ code.") |
clara::Opt{targets, "gfx803,gfx900,gfx906 etc."}["-t"]["--targets"](
clara::Opt{targets, "gfx803,gfx900,gfx906,gfx908 etc."}["-t"]["--targets"](
"targets for AMDGPU lowering; must be included in the set "
"of processors with ROCm support from "
"https://www.llvm.org/docs/AMDGPUUsage.html#processors.");
+1 -1
파일 보기
@@ -29,7 +29,7 @@ THE SOFTWARE.
#include "hip/hip_runtime.h"
#include "test_common.h"
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX900__ || __HIP_ARCH_GFX906__
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX900__ || __HIP_ARCH_GFX906__ || __HIP_ARCH_GFX908__
__global__ void kernel_abs_int64(long long *input, long long *output) {
int tx = threadIdx.x;
+1 -1
파일 보기
@@ -28,7 +28,7 @@ THE SOFTWARE.
#include "test_common.h"
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX900__ || __HIP_ARCH_GFX906__
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX900__ || __HIP_ARCH_GFX906__ || __HIP_ARCH_GFX908__
__global__
void __halfMath(bool* result, __half a) {
+1 -1
파일 보기
@@ -32,7 +32,7 @@ THE SOFTWARE.
using namespace std;
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX900__ || __HIP_ARCH_GFX906__
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX900__ || __HIP_ARCH_GFX906__ || __HIP_ARCH_GFX908__
__global__
void __halfTest(bool* result, __half a) {
+2 -1
파일 보기
@@ -21,7 +21,8 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD_CMD: libfoo %hc %S/%s -o libfoo.so -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY
* BUILD_CMD: libfoo_amd %hc %S/%s -o libfoo.so -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY EXCLUDE_HIP_PLATFORM nvcc
* BUILD_CMD: libfoo_nvidia %hc %S/%s -o libfoo.so -Xcompiler -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY EXCLUDE_HIP_PLATFORM hcc
* BUILD_CMD: %t %hc %S/%s -o %T/%t -ldl
* TEST: %t
* HIT_END
+37 -2
파일 보기
@@ -34,6 +34,13 @@ THE SOFTWARE.
#include "hip/hip_runtime.h"
#include "test_common.h"
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include "sys/types.h"
#include "sys/sysinfo.h"
#endif
void printSep() {
printf(
@@ -280,6 +287,26 @@ void memcpytest2_for_type(size_t numElements) {
}
}
#ifdef _WIN32
void memcpytest2_get_host_memory(size_t& free, size_t& total) {
MEMORYSTATUSEX status;
status.dwLength = sizeof(status);
GlobalMemoryStatusEx(&status);
free = status.ullAvailPhys;
total = status.ullTotalPhys;
}
#else
struct sysinfo memInfo;
void memcpytest2_get_host_memory(size_t& free, size_t& total) {
sysinfo(&memInfo);
long long freePhysMem=memInfo.freeram;
freePhysMem *= memInfo.mem_unit;
free = freePhysMem;
long long totalPhysMem=memInfo.totalram;
totalPhysMem *= memInfo.mem_unit;
total = totalPhysMem;
}
#endif
//---
// Try many different sizes to memory copy.
@@ -291,12 +318,20 @@ void memcpytest2_sizes(size_t maxElem = 0) {
int deviceId;
HIPCHECK(hipGetDevice(&deviceId));
size_t free, total;
size_t free, total, freeCPU, totalCPU;
HIPCHECK(hipMemGetInfo(&free, &total));
memcpytest2_get_host_memory(freeCPU, totalCPU);
if (maxElem == 0) {
maxElem = free / sizeof(T) / 8;
// Use lesser maxElem if not enough host memory available
size_t maxElemGPU = free / sizeof(T) / 8;
size_t maxElemCPU = freeCPU / sizeof(T) / 8;
maxElem = maxElemGPU < maxElemCPU ? maxElemGPU : maxElemCPU;
}
printf(
" Host: free=%zu (%4.2fMB) total=%zu (%4.2fMB)\n",
freeCPU, (float)(freeCPU / 1024.0 / 1024.0),
totalCPU, (float)(totalCPU / 1024.0 / 1024.0));
printf(
" device#%d: hipMemGetInfo: free=%zu (%4.2fMB) total=%zu (%4.2fMB) maxSize=%6.1fMB\n",
+140
파일 보기
@@ -0,0 +1,140 @@
/*
Copyright (c) 2019 - present Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
// Simple test for hipExtLaunchMultiKernelMultiDevice API. It can be tested on
// single GPU or multi GPUs.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* TEST: %t
* HIT_END
*/
#include "hip/hip_runtime.h"
#include "test_common.h"
#include <stdio.h>
#define MAX_GPUS 8
/*
* Square each element in the array A and write to array C.
*/
#define NUM_KERNEL_ARGS 3
__global__ void
vector_square(float *C_d, float *A_d, size_t N)
{
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
size_t stride = blockDim.x * gridDim.x ;
for (size_t i = offset; i < N; i += stride) {
C_d[i] = A_d[i] * A_d[i];
}
}
int main(int argc, char *argv[])
{
float *A_d[MAX_GPUS], *C_d[MAX_GPUS];
float *A_h, *C_h;
size_t N = 1000000;
size_t Nbytes = N * sizeof(float);
int nGpu = 0;
HIPCHECK(hipGetDeviceCount(&nGpu));
if (nGpu < 1) {
printf ("info: didn't find any GPU!\n");
return 0;
}
if (nGpu > MAX_GPUS) {
nGpu = MAX_GPUS;
}
printf ("info: allocate host mem (%6.2f MB)\n", 2*Nbytes/1024.0/1024.0);
A_h = (float*)malloc(Nbytes);
HIPCHECK(A_h == 0 ? hipErrorMemoryAllocation : hipSuccess );
C_h = (float*)malloc(Nbytes);
HIPCHECK(C_h == 0 ? hipErrorMemoryAllocation : hipSuccess );
// Fill with Phi + i
for (size_t i = 0; i < N; i++)
{
A_h[i] = 1.618f + i;
}
const unsigned blocks = 512;
const unsigned threadsPerBlock = 256;
hipStream_t stream[MAX_GPUS];
for (int i = 0; i < nGpu; i++) {
HIPCHECK(hipSetDevice(i));
HIPCHECK(hipStreamCreateWithFlags(&stream[i], hipStreamNonBlocking));
hipDeviceProp_t props;
HIPCHECK(hipGetDeviceProperties(&props, i/*deviceID*/));
printf ("info: running on bus 0x%2x %s\n", props.pciBusID, props.name);
printf ("info: allocate device mem (%6.2f MB)\n", 2*Nbytes/1024.0/1024.0);
HIPCHECK(hipMalloc(&A_d[i], Nbytes));
HIPCHECK(hipMalloc(&C_d[i], Nbytes));
printf ("info: copy Host2Device\n");
HIPCHECK ( hipMemcpy(A_d[i], A_h, Nbytes, hipMemcpyHostToDevice));
}
hipLaunchParams *launchParamsList = reinterpret_cast<hipLaunchParams *>(
malloc(sizeof(hipLaunchParams)*nGpu));
void *args[MAX_GPUS * NUM_KERNEL_ARGS];
for (int i = 0; i < nGpu; i++) {
args[i * NUM_KERNEL_ARGS] = &C_d[i];
args[i * NUM_KERNEL_ARGS + 1] = &A_d[i];
args[i * NUM_KERNEL_ARGS + 2] = &N;
launchParamsList[i].func =
reinterpret_cast<void *>(vector_square);
launchParamsList[i].gridDim = dim3(blocks);
launchParamsList[i].blockDim = dim3(threadsPerBlock);
launchParamsList[i].sharedMem = 0;
launchParamsList[i].stream = stream[i];
launchParamsList[i].args = args + i * NUM_KERNEL_ARGS;
}
printf ("info: launch vector_square kernel with hipExtLaunchMultiKernelMultiDevice API\n");
hipExtLaunchMultiKernelMultiDevice(launchParamsList, nGpu, 0);
for (int j = 0; j < nGpu; j++) {
hipStreamSynchronize(stream[j]);
hipDeviceProp_t props;
HIPCHECK(hipGetDeviceProperties(&props, j/*deviceID*/));
printf ("info: checking result on bus 0x%2x %s\n", props.pciBusID, props.name);
printf ("info: copy Device2Host\n");
HIPCHECK( hipMemcpy(C_h, C_d[j], Nbytes, hipMemcpyDeviceToHost));
printf ("info: check result\n");
for (size_t i = 0; i < N; i++) {
if (C_h[i] != A_h[i] * A_h[i]) {
HIPCHECK(hipErrorUnknown);
}
}
}
printf ("PASSED!\n");
}