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

gpu: generic: Fix matmul with dropout #2677

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/gpu/generic/sycl/matmul_kernels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ struct matmul_kernel_fwd_t {
}
}

void dropout(xpu::sycl::out_memory_arg_t dropout_mask, int threshold,
int seed, int inv_q, int offset, int row_stride) {
void dropout(xpu::sycl::out_memory_arg_t dropout_mask, uint threshold,
uint seed, float inv_q, int offset, int row_stride) {
for (int row = 0; row < Rows; row++) {
for (int col = 0; col < Cols / vec_len; col++) {
for (int vec_el = 0; vec_el < vec_len; vec_el++) {
int dst_off = offset + row * row_stride + col * vec_len
+ vec_el;
int random
uint random
= ::dnnl::impl::math::philox4x32(dst_off, seed);
char dropout = random > threshold;
data[row][col][vec_el]
Expand Down