Skip to content

Commit

Permalink
Fix test fail and add LlvmAotTest, DX12Kernel.
Browse files Browse the repository at this point in the history
  • Loading branch information
python3kgae committed Sep 28, 2022
1 parent 0bd70ba commit 004f433
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions tests/cpp/aot/llvm/kernel_aot_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,21 @@ TEST(LlvmAotTest, CudaKernel) {
}
}

#ifdef TI_WITH_DX12
TEST(LlvmAotTest, DX12Kernel) {
cpu::AotModuleParams aot_params;
const auto folder_dir = getenv("TAICHI_AOT_FOLDER_PATH");

std::stringstream aot_mod_ss;
aot_mod_ss << folder_dir;
aot_params.module_path = aot_mod_ss.str();
// FIXME: add executor.
aot_params.executor_ = nullptr;
auto mod = cpu::make_aot_module(aot_params);
auto *k_run = mod->get_kernel("run");
EXPECT_TRUE(k_run);
// FIXME: launch the kernel and check result.
}
#endif

} // namespace taichi::lang
2 changes: 1 addition & 1 deletion tests/python/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _get_expected_matrix_apis():
'atomic_sub', 'atomic_xor', 'axes', 'bit_cast', 'bit_shr', 'block_local',
'cache_read_only', 'cast', 'cc', 'ceil', 'cos', 'cpu', 'cuda',
'data_oriented', 'dataclass', 'deactivate', 'deactivate_all_snodes',
'dx11', 'eig', 'exp', 'experimental', 'extension', 'f16', 'f32', 'f64',
'dx11', 'dx12', 'eig', 'exp', 'experimental', 'extension', 'f16', 'f32', 'f64',
'field', 'float16', 'float32', 'float64', 'floor', 'func', 'get_addr',
'get_compute_stream_device_time_elapsed_us', 'global_thread_idx', 'gpu',
'graph', 'grouped', 'hex_to_rgb', 'i', 'i16', 'i32', 'i64', 'i8', 'ij',
Expand Down

0 comments on commit 004f433

Please sign in to comment.