Merge in the rocclr based hip runtime (#2032)

* Merge master-next changes in master (include vdi development in master branch)
This commit is contained in:
Maneesh Gupta authored and GitHub committed 2020-04-23 09:12:06 -07:00
1 والد 386a0e0123
کامیت a0b5dfd625
136 files changed
+29756 -307

No files matched your search

@@ -24,7 +24,7 @@ THE SOFTWARE.
// forces synchronization : set
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc vdi
* TEST: %t --iterations 10
* HIT_END
*/
@@ -18,7 +18,7 @@
* */
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc vdi
* TEST: %t
* HIT_END
*/
@@ -60,16 +60,16 @@ int main() {
HIPCHECK(hipDeviceSynchronize());
HipTest::checkVectorADD(A_h, B_h, C_h, N);
HIPCHECK(hipStreamCreate(&s));
HIPCHECK(hipSetDevice(1));
HIPCHECK(hipStreamCreate(&s));
HIPCHECK(hipMemcpyPeerAsync(X_d, 1, A_d, 0, Nbytes, s));
HIPCHECK(hipMemcpyPeerAsync(Y_d, 1, B_d, 0, Nbytes, s));
hipLaunchKernelGGL(HipTest::vectorADD, dim3(blocks), dim3(threadsPerBlock), 0, 0,
static_cast<const int*>(X_d), static_cast<const int*>(Y_d), Z_d, N);
HIPCHECK(hipMemcpy(C_h, Z_d, Nbytes, hipMemcpyDeviceToHost));
HIPCHECK(hipDeviceSynchronize());
HIPCHECK(hipStreamSynchronize(s));
HIPCHECK(hipDeviceSynchronize());
HipTest::checkVectorADD(A_h, B_h, C_h, N);
HIPCHECK(hipStreamDestroy(s));
@@ -26,17 +26,19 @@ THE SOFTWARE.
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* TEST: %t EXCLUDE_HIP_PLATFORM all
* HIT_END
*/
#include "hip/hip_runtime.h"
#include "test_common.h"
#ifdef __HIP_PLATFORM_HCC__
#include <hc_am.hpp>
#endif
#define USE_HCC_MEMTRACKER 0 /* Debug flag to show the memtracker periodically */
#if defined(__HIP_PLATFORM_HCC__) && !defined(__HIP_VDI__)
#include <hc_am.hpp>
#else
#define USE_HCC_MEMTRACKER 0
#endif
int elementSizes[] = {1, 16, 1024, 524288, 16 * 1000 * 1000};
int nSizes = sizeof(elementSizes) / sizeof(int);
@@ -201,7 +203,8 @@ int main(int argc, char* argv[]) {
};
for (int index = 0; index < nSizes; index++) {
testMultiGpu(dev0, dev1, elementSizes[index], false /*GPU Synchronization*/);
//ToDo: Enable when verified on all platforms
//testMultiGpu(dev0, dev1, elementSizes[index], false /*GPU Synchronization*/);
testMultiGpu(dev0, dev1, elementSizes[index], true /*Host Synchronization*/);
}
@@ -19,7 +19,7 @@ THE SOFTWARE.
/* HIT_START
* BUILD_CMD: matmul.code %hc --genco %S/matmul.cpp -o matmul.code EXCLUDE_HIP_PLATFORM nvcc
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc vdi
* TEST: %t
* HIT_END
*/
@@ -20,7 +20,7 @@ THE SOFTWARE.
// Simple test for hipLaunchCooperativeKernelMultiDevice API.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM all
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* TEST: %t
* HIT_END
*/
@@ -178,8 +178,6 @@ int main() {
hipLaunchCooperativeKernelMultiDevice(launchParamsList, nGpu, 0);
HIPCHECK(hipMemcpy(init, dC, sizeof(long), hipMemcpyDeviceToHost));
if (*dC != (((long)(BufferSizeInDwords) * (BufferSizeInDwords - 1)) / 2)) {
std::cout << "Data validation failed for grid size = " << dimGrid.x << " and block size = " << dimBlock.x << "\n";
std::cout << "Test failed! \n";
@@ -22,7 +22,7 @@ THE SOFTWARE.
// Simple test for hipLaunchCooperativeKernel API.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM all
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* TEST: %t
* HIT_END
*/
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM vdi
* TEST: %t
* HIT_END
*/
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc vdi
* TEST: %t
* HIT_END
*/
@@ -33,6 +33,9 @@ THE SOFTWARE.
#define fileName "tex2d_kernel.code"
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, 2, hipReadModeElementType> tex;
bool testResult = false;
@@ -21,11 +21,15 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code EXCLUDE_HIP_PLATFORM vdi
* HIT_END
*/
#include "hip/hip_runtime.h"
#if __HIP__
__hip_pinned_shadow__
#endif
extern texture<float, 2, hipReadModeElementType> tex;
extern "C" __global__ void tex2dKernel(float* outputData, int width, int height) {
@@ -22,7 +22,7 @@ THE SOFTWARE.
// Test the Grid_Launch syntax.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM vdi
* TEST: %t
* HIT_END
*/
@@ -11,7 +11,7 @@
#include "test_common.h"
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM vdi
* TEST: %t
* HIT_END
*/