diff --git a/sycl/plugins/hip/pi_hip.cpp b/sycl/plugins/hip/pi_hip.cpp index 4754f30546d14..b8d33f81d0bcf 100644 --- a/sycl/plugins/hip/pi_hip.cpp +++ b/sycl/plugins/hip/pi_hip.cpp @@ -3863,8 +3863,7 @@ pi_result hip_piEnqueueMemBufferFill(pi_queue command_queue, pi_mem buffer, result = retImplEv->start(); } - auto dstDevice = - (uint8_t *)buffer->mem_.buffer_mem_.get_with_offset(offset); + auto dstDevice = buffer->mem_.buffer_mem_.get_with_offset(offset); auto stream = command_queue->get(); auto N = size / pattern_size; @@ -3912,7 +3911,8 @@ pi_result hip_piEnqueueMemBufferFill(pi_queue command_queue, pi_mem buffer, value = *(static_cast(pattern) + step); // offset the pointer to the part of the buffer we want to write to - auto offset_ptr = dstDevice + (step * sizeof(uint8_t)); + auto offset_ptr = reinterpret_cast( + reinterpret_cast(dstDevice) + (step * sizeof(uint8_t))); // set all of the pattern chunks result = PI_CHECK_ERROR(hipMemset2DAsync( diff --git a/sycl/unittests/pi/EnqueueMemTest.cpp b/sycl/unittests/pi/EnqueueMemTest.cpp index edd1a85070ac3..fe007bcce8945 100644 --- a/sycl/unittests/pi/EnqueueMemTest.cpp +++ b/sycl/unittests/pi/EnqueueMemTest.cpp @@ -74,12 +74,6 @@ class EnqueueMemTest : public testing::TestWithParam { detail::plugin plugin = GetParam(); - if (plugin.getBackend() == sycl::backend::hip && sizeof(T) > 4) { - std::cerr << "HIP plugin doesn't support patterns larger than 4 bytes, " - "skipping\n"; - GTEST_SKIP(); - } - T inValues[_numElementsX] = {}; for (size_t i = 0; i < _numElementsX; ++i) {