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

Commit bcf16cb

Browse files
Rename proto flag
This makes it clear this flag is specific to this test, rather than a generic tuner flag
1 parent da7a8f1 commit bcf16cb

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

examples/blockdiagperm.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "tc/core/flags.h"
3131
#include "tc/core/mapping_options.h"
3232

33-
DEFINE_string(tuner_proto, "", "Filename to load and store proto cache ");
33+
DEFINE_string(proto_path, "", "Filename to load and store proto cache ");
3434

3535
TEST(BlockDiagPerm, SimpleAutotune) {
3636
// 1. Define and setup the TC compilation unit with CUDA memory
@@ -77,7 +77,7 @@ def blockdiagperm2dfissioned_2(float(B, N) I, int32(N) Idx) -> (O) {
7777
auto options = tc::CudaMappingOptions::makeNaiveCudaMappingOptions();
7878
tc::autotune::GeneticAutotunerATen geneticAutotuneATen(tc);
7979
auto bestOption = geneticAutotuneATen.tune(
80-
FLAGS_tuner_proto, "blockdiagperm2dfissioned_1", {I, W}, options);
80+
FLAGS_proto_path, "blockdiagperm2dfissioned_1", {I, W}, options);
8181
auto handle = atCompl.compile(
8282
"blockdiagperm2dfissioned_1", {I, W}, bestOption.getValue());
8383
std::vector<at::Tensor> outputs;
@@ -89,7 +89,7 @@ def blockdiagperm2dfissioned_2(float(B, N) I, int32(N) Idx) -> (O) {
8989
at::Tensor Idx = at::CPU(at::kInt).randperm({500}).toBackend(at::kCUDA);
9090
tc::autotune::GeneticAutotunerATen geneticAutotuneATen2(tc);
9191
auto bestOption2 = geneticAutotuneATen.tune(
92-
FLAGS_tuner_proto, "blockdiagperm2dfissioned_2", {O, Idx}, options);
92+
FLAGS_proto_path, "blockdiagperm2dfissioned_2", {O, Idx}, options);
9393
auto handle2 = atCompl.compile(
9494
"blockdiagperm2dfissioned_2", {O, Idx}, bestOption2.getValue());
9595
std::vector<at::Tensor> outputs2;
@@ -120,7 +120,7 @@ def blockdiagperm2dfissioned_2(float(B, N) I, int32(N) Idx) -> (O) {
120120
// From root, run with:
121121
// ./build/examples/blockdiagperm --tuner_threads=10 --tuner_gen_pop_size=10
122122
// --tuner_gen_generations=3 --tuner_gen_number_elites=4
123-
// --tuner_proto="/tmp/blockdiagperm"
123+
// --proto_path="/tmp/blockdiagperm"
124124
int main(int argc, char** argv) {
125125
::testing::InitGoogleTest(&argc, argv);
126126
::gflags::ParseCommandLineFlags(&argc, &argv, true);

examples/tensordot.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "../test/test_harness_aten_cuda.h"
3232

33-
DEFINE_string(tuner_proto, "", "Filename to load and store proto cache ");
33+
DEFINE_string(proto_path, "", "Filename to load and store proto cache ");
3434

3535
TEST(TensorDot, SimpleAutotune) {
3636
// 1. Define and setup the TC compilation unit with CUDA memory
@@ -53,7 +53,7 @@ def tensordot(float(N, C1, C2, H, W) I0,
5353
auto naiveOptions = tc::CudaMappingOptions::makeNaiveCudaMappingOptions();
5454
tc::autotune::GeneticAutotunerATen geneticAutotuneATen(tc);
5555
auto bestOption = geneticAutotuneATen.tune(
56-
FLAGS_tuner_proto, "tensordot", {I0, I1}, naiveOptions);
56+
FLAGS_proto_path, "tensordot", {I0, I1}, naiveOptions);
5757

5858
// 4. Compile and run the TC with the best option.
5959
// Outputs get allocated; could also be pre-allocated and passed.
@@ -90,7 +90,7 @@ def tensordot(float(N, C1, C2, H, W) I0,
9090
// From root, run with:
9191
// ./build/examples/tensordot --tuner_threads=10 --tuner_gen_pop_size=10
9292
// --tuner_gen_generations=3 --tuner_gen_number_elites=4
93-
// --tuner_proto="/tmp/tensordot"
93+
// --proto_path="/tmp/tensordot"
9494
int main(int argc, char** argv) {
9595
::testing::InitGoogleTest(&argc, argv);
9696
::gflags::ParseCommandLineFlags(&argc, &argv, true);

examples/wavenet.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "../test/test_harness_aten_cuda.h"
3232

33-
DEFINE_string(tuner_proto, "", "Filename to load and store proto cache ");
33+
DEFINE_string(proto_path, "", "Filename to load and store proto cache ");
3434

3535
TEST(WaveNet2Layers, SimpleAutotune) {
3636
// 1. Define and setup the TC compilation unit with CUDA memory
@@ -121,7 +121,7 @@ def wavenet2layers(
121121
skip_weight1,
122122
skip_bias1};
123123
auto bestOption = geneticAutotuneATen.tune(
124-
FLAGS_tuner_proto, "wavenet2layers", tensors, naiveOptions);
124+
FLAGS_proto_path, "wavenet2layers", tensors, naiveOptions);
125125

126126
// 4. Compile and run the TC with the best option.
127127
// Outputs get allocated; could also be pre-allocated and passed.
@@ -165,7 +165,7 @@ def wavenet2layers(
165165
// From root, run with:
166166
// ./build/examples/wavenet --tuner_threads=10 --tuner_gen_pop_size=10
167167
// --tuner_gen_generations=3 --tuner_gen_number_elites=4
168-
// --benchmark_iterations=1000 --tuner_proto="/tmp/wavenet"
168+
// --benchmark_iterations=1000 --proto_path="/tmp/wavenet"
169169
int main(int argc, char** argv) {
170170
::testing::InitGoogleTest(&argc, argv);
171171
::gflags::ParseCommandLineFlags(&argc, &argv, true);

0 commit comments

Comments
 (0)