Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] Support for half-float mixed precise in brute-force #2382

Merged
merged 20 commits into from
Aug 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix the Floating-point exception
  • Loading branch information
rhdong committed Jul 19, 2024
commit 6103fd173201bc119d2d1c02aa94a6096cb4379f
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/detail/transpose.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void transpose_half(
int grid_y = (n_rows + block_dim_x - 1) / block_dim_x;

float ratio = static_cast<float>(grid_y) / static_cast<float>(grid_x);
int adjusted_grid_y = std::min(grid_y, static_cast<int>(sqrt(num_blocks * ratio)));
int adjusted_grid_y = std::max(std::min(grid_y, static_cast<int>(sqrt(num_blocks * ratio))), 1);
int adjusted_grid_x = std::max(std::min(grid_x, num_blocks / adjusted_grid_y), 1);

dim3 grids(adjusted_grid_x, adjusted_grid_y);
Expand Down
Loading