Skip to content

Commit

Permalink
Merge fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
csarofeen committed Nov 4, 2024
1 parent d372ae2 commit 097674d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions tests/cpp/test_combined_inner_outer_reduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,8 @@ TEST_F(CombinedSchedulerTest, SharedMemoryPersistentVectFactor) {
heuristic_params->as<ReductionParams>()->smem_persistent_buffers =
std::vector<TensorView*>{tv1};
scheduler->schedule(&fusion, heuristic_params.get());
FusionExecutor fe;
fe.compileFusion(&fusion, aten_inputs);
KernelExecutor ke;
ke.compile(&fusion, aten_inputs);

for (auto tv : fusion.allTvs()) {
if (tv->getMemoryType() == MemoryType::Shared) {
Expand All @@ -992,8 +992,8 @@ TEST_F(CombinedSchedulerTest, SharedMemoryPersistentVectFactor) {
}
}
}
auto cg_outputs = fe.runFusion(
aten_inputs, heuristic_params->as<ReductionParams>()->lparams);
auto cg_outputs =
ke.run(aten_inputs, heuristic_params->as<ReductionParams>()->lparams);
testValidate(&fusion_copy, cg_outputs, aten_inputs, __LINE__, __FILE__);
}

Expand Down
6 changes: 3 additions & 3 deletions tests/cpp/test_gpu3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8875,9 +8875,9 @@ TEST_F(NVFuserTest, CpAsyncDataTypeBool) {
// "r"((uint32_t)((!b3)))
// );
// If not correctly lowered, would trigger error in compile
FusionExecutor fe;
fe.compileFusion(&fusion, {t0});
auto cg_outputs = fe.runFusion({t0});
KernelExecutor ke;
ke.compile(&fusion, {t0});
auto cg_outputs = ke.run({t0});
testValidate(&fusion, cg_outputs, {t0}, __LINE__, __FILE__);
}
// Test file size should be up to 10K LoC. Create a new file for more tests.
Expand Down
12 changes: 6 additions & 6 deletions tests/cpp/test_matmul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,19 @@ TEST_P(MatmulTestWithLayout, AmpereMatmulBroadcastBatch) {

auto inputs = matmulAtInput3DTuring(M, N, K, layout);

FusionExecutor fe;
KernelExecutor ke;
NVFUSER_TEST_CUDA_ARCH_COMPILE_CHECK(
8,
0,
fe.compileFusion(
ke.compile(
&fusion,
{inputs.first, inputs.second},
LaunchParams(),
matmul_cparams));
ASSERT_TRUE(getBankConflictInfo(fe.kernel()).empty());
ASSERT_TRUE(getBankConflictInfo(ke.kernel()).empty());
ASSERT_FALSE(
PredicatedChecker::isCpAsyncMmaPredicatedByIfThenElse(fe.kernel()));
auto cg_outputs = fe.runFusion({inputs.first, inputs.second});
PredicatedChecker::isCpAsyncMmaPredicatedByIfThenElse(ke.kernel()));
auto cg_outputs = ke.run({inputs.first, inputs.second});
auto tref =
atMatmul(
inputs.first.to(at::kFloat), inputs.second.to(at::kFloat), layout)
Expand Down Expand Up @@ -2700,7 +2700,7 @@ TEST_F(MatmulTest, AmpereMatmulSmemEpiloguePromotionRequiredA100) {
SchedulerEntry::makeSchedulerInstance(SchedulerType::Matmul)
->schedule(&fusion, &mparams);

// KernelExecutor::compileFusion would fail otherwise.
// KernelExecutor::compile would fail otherwise.
SKIP_IF_INSUFFICIENT_SMEM(&mparams, data_types);

at::manual_seed(0);
Expand Down
24 changes: 12 additions & 12 deletions tests/cpp/test_matmul_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3140,13 +3140,13 @@ TEST_F(MatmulSchedulerTest, HSH_TT) {
//! TODO Disabled because hopper multiple matmul scheduler is currently a copy
//! of ampere scheduler.
/*
FusionExecutor fe;
fe.compileFusion(
KernelExecutor ke;
ke.compile(
fusion.get(),
{inputs.first, inputs.second},
LaunchParams(),
matmul_cparams);
auto cg_outputs = fe.runFusion({inputs.first, inputs.second});
auto cg_outputs = ke.run({inputs.first, inputs.second});
auto tref = atMatmul(inputs.first.squeeze(), inputs.second.squeeze(), layout);
EXPECT_TRUE(at::allclose(cg_outputs[0], tref, 1e-5, 1e-5));
*/
Expand Down Expand Up @@ -3211,14 +3211,14 @@ TEST_F(MatmulSchedulerTest, HSH_TN) {
auto inputs =
matmulAtInput3DHopperSS(M, N, K, layout, data_type_to_aten(dtype));

FusionExecutor fe;
fe.compileFusion(
KernelExecutor ke;
ke.compile(
fusion.get(),
{inputs.first, inputs.second},
LaunchParams(),
matmul_cparams);

auto cg_outputs = fe.runFusion({inputs.first, inputs.second});
auto cg_outputs = ke.run({inputs.first, inputs.second});
auto tref = atMatmul(inputs.first.squeeze(), inputs.second.squeeze(), layout);
EXPECT_TRUE(at::allclose(cg_outputs[0], tref, 1e-5, 1e-5));
}
Expand Down Expand Up @@ -3286,14 +3286,14 @@ TEST_F(MatmulSchedulerTest, HSH_NT) {
auto inputs =
matmulAtInput3DHopperSS(M, N, K, layout, data_type_to_aten(dtype));

FusionExecutor fe;
fe.compileFusion(
KernelExecutor ke;
ke.compile(
fusion.get(),
{inputs.first, inputs.second},
LaunchParams(),
matmul_cparams);

auto cg_outputs = fe.runFusion({inputs.first, inputs.second});
auto cg_outputs = ke.run({inputs.first, inputs.second});
auto tref = atMatmul(inputs.first.squeeze(), inputs.second.squeeze(), layout);
EXPECT_TRUE(at::allclose(cg_outputs[0], tref, 1e-5, 1e-5));
}
Expand Down Expand Up @@ -3363,13 +3363,13 @@ TEST_F(MatmulSchedulerTest, HSH_NN) {
// TODO Disabled because hopper multiple matmul scheduler is currently a copy
// of ampere scheduler.
/*
FusionExecutor fe;
fe.compileFusion(
KernelExecutor ke;
ke.compile(
fusion.get(),
{inputs.first, inputs.second},
LaunchParams(),
matmul_cparams);
auto cg_outputs = fe.runFusion({inputs.first, inputs.second});
auto cg_outputs = ke.run({inputs.first, inputs.second});
auto tref = atMatmul(inputs.first.squeeze(), inputs.second.squeeze(), layout);
EXPECT_TRUE(at::allclose(cg_outputs[0], tref, 1e-5, 1e-5));
*/
Expand Down

0 comments on commit 097674d

Please sign in to comment.