rm some hip
This commit is contained in:
@@ -40,25 +40,13 @@ TEST(ArrayInterface, Stream) {
|
||||
TEST(ArrayInterface, Ptr) {
|
||||
std::vector<float> h_data(10);
|
||||
ASSERT_FALSE(ArrayInterfaceHandler::IsCudaPtr(h_data.data()));
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaGetLastError());
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipGetLastError());
|
||||
#endif
|
||||
|
||||
dh::device_vector<float> d_data(10);
|
||||
ASSERT_TRUE(ArrayInterfaceHandler::IsCudaPtr(d_data.data().get()));
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaGetLastError());
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipGetLastError());
|
||||
#endif
|
||||
|
||||
ASSERT_FALSE(ArrayInterfaceHandler::IsCudaPtr(nullptr));
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaGetLastError());
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipGetLastError());
|
||||
#endif
|
||||
}
|
||||
} // namespace xgboost
|
||||
|
||||
@@ -51,11 +51,7 @@ void TestCudfAdapter()
|
||||
}
|
||||
});
|
||||
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaDeviceSynchronize());
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipDeviceSynchronize());
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -234,11 +234,7 @@ TEST(EllpackPage, Compact) {
|
||||
|
||||
dh::LaunchN(kCols, ReadRowFunction(impl->GetDeviceAccessor(FstCU()),
|
||||
current_row, row_d.data().get()));
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaDeviceSynchronize());
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipDeviceSynchronize());
|
||||
#endif
|
||||
thrust::copy(row_d.begin(), row_d.end(), row.begin());
|
||||
|
||||
dh::LaunchN(kCols,
|
||||
|
||||
@@ -47,11 +47,7 @@ std::string PrepareData(std::string typestr, thrust::device_vector<T>* out, cons
|
||||
}
|
||||
|
||||
TEST(MetaInfo, FromInterface) {
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
cudaSetDevice(0);
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
hipSetDevice(0);
|
||||
#endif
|
||||
|
||||
Context ctx;
|
||||
thrust::device_vector<float> d_data;
|
||||
@@ -96,11 +92,7 @@ TEST(MetaInfo, GPUStridedData) {
|
||||
}
|
||||
|
||||
TEST(MetaInfo, Group) {
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
cudaSetDevice(0);
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
hipSetDevice(0);
|
||||
#endif
|
||||
|
||||
MetaInfo info;
|
||||
Context ctx;
|
||||
@@ -155,11 +147,7 @@ TEST(MetaInfo, GPUQid) {
|
||||
|
||||
|
||||
TEST(MetaInfo, DeviceExtend) {
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaSetDevice(0));
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipSetDevice(0));
|
||||
#endif
|
||||
|
||||
size_t const kRows = 100;
|
||||
MetaInfo lhs, rhs;
|
||||
|
||||
@@ -115,13 +115,8 @@ TEST(SimpleDMatrix, FromColumnarWithEmptyRows) {
|
||||
data.resize(kRows);
|
||||
thrust::sequence(data.begin(), data.end(), 0);
|
||||
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
dh::safe_cuda(cudaDeviceSynchronize());
|
||||
dh::safe_cuda(cudaGetLastError());
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
dh::safe_cuda(hipDeviceSynchronize());
|
||||
dh::safe_cuda(hipGetLastError());
|
||||
#endif
|
||||
|
||||
ASSERT_EQ(data.size(), kRows);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user