Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 7d1a764

Browse files
example_simple -> example_tensordot
1 parent a53350d commit 7d1a764

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ After a few generations of `autotuning` on a 2-GPU P100 system, we see results r
2929

3030
![Autotuning Sample](docs/source/_static/img/autotuning.png)
3131

32-
In C++ a minimal autotuning example resembles the [following](example/example_simple.cc):
32+
In C++ a minimal autotuning example resembles the [following](example/example_tensordot.cc):
3333
```cpp
3434
TEST(TensorDot, SimpleAutotune) {
3535
// 1. Define and setup the TC compilation unit with CUDA memory

examples/CMakeLists.txt

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,25 @@ set(GTEST_LIBS gtest gtest_main)
2222
################################################################################
2323
# Simple Example
2424
################################################################################
25-
add_executable(example_simple example_simple.cc)
26-
add_test(example_simple example_simple)
27-
target_link_libraries(
28-
example_simple
25+
set(EXAMPLES_FILES
26+
example_tensordot
27+
)
28+
foreach(i ${EXAMPLES_FILES})
29+
add_executable(${i} ${i}.cc)
30+
add_test(${i} ${i})
31+
target_link_libraries(
32+
${i}
2933

30-
tc_autotuner
31-
tc_core
34+
tc_autotuner
35+
tc_core
3236

33-
${GTEST_LIBS}
34-
${GFLAGS_LIBRARIES}
35-
${GLOG_LIBRARIES}
37+
${GTEST_LIBS}
38+
${GFLAGS_LIBRARIES}
39+
${GLOG_LIBRARIES}
3640

37-
${ATEN_LIBRARIES}
38-
)
41+
${ATEN_LIBRARIES}
42+
)
43+
endforeach()
3944

4045
################################################################################
4146
# Examples

examples/example_simple.cc renamed to examples/example_tensordot.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ DEFINE_uint32(pop_size, 10, "Population size to tune for");
3636
DEFINE_uint32(threads, 16, "Number of threads to tune with");
3737
DEFINE_string(gpus, "0", "List of gpus to evaluate on");
3838

39+
// TODO: This temporary flag will be disabled later
40+
DEFINE_bool(disable_version_checks, false, "TODO: remove me");
41+
3942
TEST(TensorDot, SimpleAutotune) {
4043
// 1. Define and setup the TC compilation unit with CUDA memory
4144
// management backed by ATen tensors.

0 commit comments

Comments
 (0)