SWDEV-470698 - fix formatting, add format check workflow (#657)
This commit is contained in:
committed by
GitHub
parent
5840940caa
commit
f7338717ae
@@ -51,7 +51,7 @@ static __global__ void vecSqrSingBlk(int* A_d, size_t NELEM) {
|
||||
* - HIP_VERSION >= 6.1
|
||||
*/
|
||||
TEST_CASE("Unit_kernel_Assign_threadIdx_to_auto") {
|
||||
int *A_d;
|
||||
int* A_d;
|
||||
const unsigned blocks = 256;
|
||||
const unsigned threadsPerBlock = 128;
|
||||
size_t N = (blocks * threadsPerBlock);
|
||||
@@ -66,12 +66,11 @@ TEST_CASE("Unit_kernel_Assign_threadIdx_to_auto") {
|
||||
// Transfer data and perform operations on GPU
|
||||
HIP_CHECK(hipMalloc(&A_d, Nbytes));
|
||||
HIP_CHECK(hipMemcpy(A_d, A_h.data(), Nbytes, hipMemcpyHostToDevice));
|
||||
hipLaunchKernelGGL(vecSqrSingBlk, dim3(blocks), dim3(threadsPerBlock),
|
||||
0, 0, A_d, N);
|
||||
hipLaunchKernelGGL(vecSqrSingBlk, dim3(blocks), dim3(threadsPerBlock), 0, 0, A_d, N);
|
||||
HIP_CHECK(hipMemcpy(C_h.data(), A_d, Nbytes, hipMemcpyDeviceToHost));
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
for (size_t i = 0; i < N; i++) {
|
||||
REQUIRE(C_h[i] == (i*i));
|
||||
REQUIRE(C_h[i] == (i * i));
|
||||
}
|
||||
HIP_CHECK(hipFree(A_d));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user