diff --git a/docs/source/framework/pytorch_integration/autograd_with_tc.rst b/docs/source/framework/pytorch_integration/autograd_with_tc.rst index b59ec0e5e..ab96f00e6 100644 --- a/docs/source/framework/pytorch_integration/autograd_with_tc.rst +++ b/docs/source/framework/pytorch_integration/autograd_with_tc.rst @@ -114,8 +114,8 @@ Let's see how to cache options to file when we tune a training layer. out = convolution(I, W) out[0].sum().backward() -You will find two cache files created: :code:`convolution_train.cuda/options` has -options for the forward layer and :code:`convolution_train_backward.cuda/options` file +You will find a cache file created: :code:`convolution_train.options` has +options for the forward layer and :code:`convolution_train_backward.options` file has options for the grad layer. Reordering grad outputs diff --git a/docs/source/framework/pytorch_integration/autotuning_layers.rst b/docs/source/framework/pytorch_integration/autotuning_layers.rst index 4574e4f85..0aa81dd5f 100644 --- a/docs/source/framework/pytorch_integration/autotuning_layers.rst +++ b/docs/source/framework/pytorch_integration/autotuning_layers.rst @@ -219,7 +219,7 @@ For example: tc.decode --------- -When you save the autotuner cache, two files are created ending in :code:`.cuda/.options`. +When you save the autotuner cache, one file is created ending in :code:`.options`. The :code:`.options` file contains the encoded kernel options. If you are curious about what those options look like, you can decode the options by calling :code:`tc.decode` diff --git a/tc/autotuner/genetic_autotuner.cc b/tc/autotuner/genetic_autotuner.cc index 3e7ca8f43..01ec5b7b2 100644 --- a/tc/autotuner/genetic_autotuner.cc +++ b/tc/autotuner/genetic_autotuner.cc @@ -53,8 +53,7 @@ void GeneticAutotuner::storeCaches(const std::string& filename) { if (filename.empty()) { std::cout << "No filepath provided, not saving cache" << std::endl; } else { - std::cout << "Dumping cache to " << filename << ".cuda/options" - << std::endl; + std::cout << "Dumping cache to " << filename << ".options" << std::endl; tc::OptionsCache::getCache()->keepOnlyBestCandidates( tc::FLAGS_tuner_save_best_candidates_count); tc::OptionsCache::dumpCacheToProtobuf(tc::makeOptionsFilename(filename)); @@ -69,7 +68,7 @@ std::vector GeneticAutotuner::load( const std::vector& inputs, const size_t numCandidates) { std::cout << "Loading proto from: " << tc::makeOptionsFilename(cacheFileName) - << " and " << tc::makeCudaFilename(cacheFileName) << std::endl; + << std::endl; enableOrLoadCache(cacheFileName); tc::FLAGS_tuner_gen_restore_number = std::min(numCandidates, size_t(FLAGS_tuner_gen_pop_size) - 1); @@ -141,7 +140,7 @@ llvm::Optional GeneticAutotuner::tune( tuner.run(FLAGS_tuner_gen_generations); } catch (const std::exception& e) { std::cerr << "Exception during autotuning: " << e.what() - << "\n dumping cache to " << cacheFileName << ".cuda/options" + << "\n dumping cache to " << cacheFileName << ".options" << std::endl; storeCaches(cacheFileName); tunerThreadEx = std::current_exception(); diff --git a/tc/benchmarks/benchmark_fixture.h b/tc/benchmarks/benchmark_fixture.h index e0757b9e0..e88bbdaf2 100644 --- a/tc/benchmarks/benchmark_fixture.h +++ b/tc/benchmarks/benchmark_fixture.h @@ -255,8 +255,7 @@ struct Benchmark : public ::testing::Test { return true; }) { std::cout << "Validating proto from: " - << tc::makeOptionsFilename(cacheFilename) << "and " - << tc::makeCudaFilename(cacheFilename) << std::endl; + << tc::makeOptionsFilename(cacheFilename) << std::endl; tc::OptionsCache::enableCache(); tc::OptionsCache::loadCacheFromProtobuf(cacheFilename + ".options"); diff --git a/tc/core/compilation_cache.h b/tc/core/compilation_cache.h index 1c5267d44..f710d161b 100644 --- a/tc/core/compilation_cache.h +++ b/tc/core/compilation_cache.h @@ -101,7 +101,4 @@ inline std::string makeOptionsFilename(const std::string& filename) { return filename + ".options"; } -inline std::string makeCudaFilename(const std::string& filename) { - return filename + ".cuda"; -} } // namespace tc diff --git a/test_python/layers/test_autotuner.py b/test_python/layers/test_autotuner.py index 3fab7adab..46aec9e9f 100644 --- a/test_python/layers/test_autotuner.py +++ b/test_python/layers/test_autotuner.py @@ -105,7 +105,7 @@ def test_autotuner_cachefile_first(self): def test_autotuner_cachefile_load(self): lang = MATMUL_LANG cache_file = "{}/matmul_100_400_500".format(PATH_PREFIX) # use argparse if input from command line - assert os.path.isfile("{}.cuda".format(cache_file)), "looks like the cache_file doesn't exist" + assert os.path.isfile("{}.options".format(cache_file)), "looks like the cache_file doesn't exist" matmul = tc.define(lang, name="matmul") mat1, mat2 = torch.randn(100, 400).cuda(), torch.randn(400, 500).cuda()