Skip to content

Commit

Permalink
Replace ones with rand to workaround the crash from sdpa kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Executorch committed Dec 17, 2024
1 parent 6cb6af9 commit bedecd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension/benchmark/apple/Benchmark/Tests/GenericTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ @implementation GenericTests

const auto sizes = tensor_meta->sizes();
tensors.emplace_back(
ones({sizes.begin(), sizes.end()}, tensor_meta->scalar_type()));
rand({sizes.begin(), sizes.end()}, tensor_meta->scalar_type()));
XCTAssertEqual(module->set_input(tensors.back(), index), Error::Ok);
} break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ @implementation LLaMATests
tokensPerSecondMetric.tokenCount = 0;
const auto status = runner->generate(
"Once upon a time",
128,
50,
[=](const std::string &token) {
tokensPerSecondMetric.tokenCount++;
},
Expand Down

0 comments on commit bedecd8

Please sign in to comment.