Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ struct ExampleRunner {
auto D2 = std::vector<ElementOutput>(size(D2_shape));
compat::memcpy<ElementOutput>(D.data(), block_ref_D.get(), size(D_shape));
compat::wait();

if (N < NUM_HEAD * (NOPE_DIM + ROPE_DIM)) {
std::cout << "Error: n < num_head * (nope_dim + rope_dim). Please set a sufficiently large value for n. Skipping the check." << std::endl;
return true;
}
Comment on lines +222 to +224
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this parameters checking before launching the kernel?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, should we skip the validation of these out-of-range data or never let the kernel launching?

for (int l = 0; l < L; l++) {
for (int i = 0; i < M; i++) {
for (int j = 0; j < NUM_HEAD; j++) {
Expand Down