SWDEV-299127 - Merge 'develop' into 'amd-staging'
Change-Id: Id26ad878e7d3a7a0a235a9eaf831b1be1e1dd2d8
[ROCm/hip commit: b26c932366]
This commit is contained in:
@@ -191,7 +191,7 @@ TEST_CASE("Unit_hipMemcpy2DToArray_multiDevicePinnedMemPeerGpu") {
|
||||
HIP_CHECK(hipGetDeviceCount(&numDevices));
|
||||
if (numDevices > 1) {
|
||||
int canAccessPeer = 0;
|
||||
hipDeviceCanAccessPeer(&canAccessPeer, 0, 1);
|
||||
HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1));
|
||||
if (canAccessPeer) {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
hipArray *A_d{nullptr};
|
||||
@@ -248,7 +248,7 @@ TEST_CASE("Unit_hipMemcpy2DToArray_multiDeviceDeviceContextChange") {
|
||||
HIP_CHECK(hipGetDeviceCount(&numDevices));
|
||||
if (numDevices > 1) {
|
||||
int canAccessPeer = 0;
|
||||
hipDeviceCanAccessPeer(&canAccessPeer, 0, 1);
|
||||
HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1));
|
||||
if (canAccessPeer) {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
hipArray *A_d{nullptr};
|
||||
|
||||
@@ -216,7 +216,7 @@ TEST_CASE("Unit_hipMemcpy2DToArrayAsync_multiDevicePinnedHostMem") {
|
||||
HIP_CHECK(hipGetDeviceCount(&numDevices));
|
||||
if (numDevices > 1) {
|
||||
int canAccessPeer = 0;
|
||||
hipDeviceCanAccessPeer(&canAccessPeer, 0, 1);
|
||||
HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1));
|
||||
if (canAccessPeer) {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
hipArray *A_d{nullptr};
|
||||
@@ -278,7 +278,7 @@ TEST_CASE("Unit_hipMemcpy2DToArrayAsync_multiDeviceDeviceContextChange") {
|
||||
HIP_CHECK(hipGetDeviceCount(&numDevices));
|
||||
if (numDevices > 1) {
|
||||
int canAccessPeer = 0;
|
||||
hipDeviceCanAccessPeer(&canAccessPeer, 0, 1);
|
||||
HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1));
|
||||
if (canAccessPeer) {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
hipArray *A_d{nullptr};
|
||||
|
||||
@@ -109,10 +109,10 @@ void Memcpy3DAsync<T>::AllocateMemory() {
|
||||
*/
|
||||
template <typename T>
|
||||
void Memcpy3DAsync<T>::DeAllocateMemory() {
|
||||
hipFreeArray(arr);
|
||||
hipFreeArray(arr1);
|
||||
HIP_CHECK(hipFreeArray(arr));
|
||||
HIP_CHECK(hipFreeArray(arr1));
|
||||
free(hData);
|
||||
hipStreamDestroy(stream);
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -73,7 +73,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyParam2DAsync_multiDevice-StreamOnDiffDevice",
|
||||
// Initalizing A_d with C_h
|
||||
HIP_CHECK(hipSetDevice(1));
|
||||
hipStream_t stream;
|
||||
hipStreamCreate(&stream);
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
HIP_CHECK(hipMemcpy2DAsync(A_d, pitch_A, C_h, width,
|
||||
NUM_W*sizeof(TestType), NUM_H,
|
||||
@@ -143,7 +143,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyParam2DAsync_multiDevice-D2D",
|
||||
size_t pitch_A;
|
||||
size_t width{NUM_W * sizeof(TestType)};
|
||||
hipStream_t stream;
|
||||
hipStreamCreate(&stream);
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
HIP_CHECK(hipMallocPitch(reinterpret_cast<void**>(&A_d),
|
||||
&pitch_A, width, NUM_H));
|
||||
HipTest::initArrays<TestType>(nullptr, nullptr, nullptr,
|
||||
@@ -257,7 +257,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyParam2DAsync_multiDevice-H2D-D2H",
|
||||
} else {
|
||||
// Host to Device
|
||||
hip_Memcpy2D desc = {};
|
||||
hipStreamCreate(&stream);
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
#ifdef __HIP_PLATFORM_NVCC__
|
||||
desc.srcMemoryType = CU_MEMORYTYPE_HOST;
|
||||
#else
|
||||
@@ -331,7 +331,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_ExtentValidation") {
|
||||
size_t width{NUM_W * sizeof(char)};
|
||||
constexpr auto memsetval{100};
|
||||
hipStream_t stream;
|
||||
hipStreamCreate(&stream);
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
// Allocating and Initializing the data
|
||||
HIP_CHECK(hipMallocPitch(reinterpret_cast<void**>(&A_d),
|
||||
@@ -409,7 +409,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Negative") {
|
||||
size_t width{NUM_W * sizeof(float)};
|
||||
constexpr auto memsetval{100};
|
||||
hipStream_t stream;
|
||||
hipStreamCreate(&stream);
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
// Allocating and Initializing the data
|
||||
HIP_CHECK(hipMallocPitch(reinterpret_cast<void**>(&A_d),
|
||||
|
||||
@@ -6,7 +6,8 @@ TEST_CASE("Unit_hipMemset_4bytes") {
|
||||
REQUIRE(res == hipSuccess);
|
||||
res = hipMemset(d_a, 0, sizeof(int));
|
||||
REQUIRE(res == hipSuccess);
|
||||
hipFree(d_a);
|
||||
res = hipFree(d_a);
|
||||
REQUIRE(res == hipSuccess);
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipMemset_4bytes_hostMem") {
|
||||
@@ -15,5 +16,6 @@ TEST_CASE("Unit_hipMemset_4bytes_hostMem") {
|
||||
REQUIRE(res == hipSuccess);
|
||||
res = hipMemset(d_a, 0, sizeof(int));
|
||||
REQUIRE(res == hipSuccess);
|
||||
hipHostFree(d_a);
|
||||
res = hipHostFree(d_a);
|
||||
REQUIRE(res == hipSuccess);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user