SWDEV-470698 - fix formatting, add format check workflow (#657)

This commit is contained in:
Danylo Lytovchenko
2025-08-20 16:28:06 +02:00
committed by GitHub
vanhempi 5840940caa
commit f7338717ae
1574 muutettua tiedostoa jossa 162972 lisäystä ja 199346 poistoa
@@ -26,14 +26,14 @@ static void Copy_to_device() {
int* A_h = nullptr;
int* A_d = nullptr;
HIP_CHECK(hipHostMalloc(&A_h, ele_size*sizeof(int)));
HIP_CHECK(hipHostMalloc(&A_h, ele_size * sizeof(int)));
HIP_CHECK(hipMalloc(&A_d, ele_size * sizeof(int)));
for (unsigned int i = 0; i < ele_size; ++i) {
A_h[i] = 123;
}
HIP_CHECK(hipMemcpyAsync(A_d, A_h, ele_size * sizeof(int), hipMemcpyHostToDevice,
hipStreamPerThread));
HIP_CHECK(
hipMemcpyAsync(A_d, A_h, ele_size * sizeof(int), hipMemcpyHostToDevice, hipStreamPerThread));
// Clean up
HIP_CHECK(hipHostFree(A_h));
HIP_CHECK(hipFree(A_d));
@@ -48,7 +48,7 @@ TEST_CASE("Unit_hipStreamPerThread_MultiThread") {
constexpr unsigned int MAX_THREAD_CNT = 10;
std::vector<std::thread> threads(MAX_THREAD_CNT);
for (auto &th : threads) {
for (auto& th : threads) {
th = std::thread(Copy_to_device);
}