Skip to content

Commit

Permalink
fix warning in hipfft multi gpu example
Browse files Browse the repository at this point in the history
  • Loading branch information
Snektron authored and Beanavil committed Sep 6, 2024
1 parent cc222d0 commit 96259a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Libraries/hipFFT/multi_gpu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ int main(int argc, char* argv[])
std::uniform_real_distribution<double> distribution{};
std::generate(input.begin(),
input.end(),
[&]() {
return data_t{distribution(generator), distribution(generator)};
});
[&]() { return data_t{distribution(generator), distribution(generator)}; });

std::cout << "Input:\n" << std::setprecision(3);
print_nd_data(input, length, 16);
Expand All @@ -88,8 +86,9 @@ int main(int argc, char* argv[])
HIPFFT_CHECK(hipfftXtSetGPUs(plan, devices.size(), devices.data()));

// 5. Make the 2D FFT plan.
size_t workSize[devices.size()];
HIPFFT_CHECK(hipfftMakePlan2d(plan, length[0], length[1], hipfftType::HIPFFT_Z2Z, workSize));
std::vector<size_t> work_size(devices.size());
HIPFFT_CHECK(
hipfftMakePlan2d(plan, length[0], length[1], hipfftType::HIPFFT_Z2Z, work_size.data()));

// 6. Allocate memory on device.
hipLibXtDesc* input_desc;
Expand Down

0 comments on commit 96259a9

Please sign in to comment.