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

Commit e763a0e

Browse files
Drop commented out code from test_compilation_cache.cc
1 parent d0961ba commit e763a0e

File tree

1 file changed

+0
-74
lines changed

1 file changed

+0
-74
lines changed

test/cuda/test_compilation_cache.cc

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -437,40 +437,6 @@ TEST_F(OptionsCacheTest, Serialization) {
437437
ASSERT_EQ(tc::OptionsCache::getCache()->numberCacheAttemps, 0);
438438
}
439439

440-
/*
441-
*class FCReluTester {
442-
* public:
443-
* FCReluTester(int B, int M, int N)
444-
* : inputs_{at::CUDA(at::kFloat).rand({B, M}),
445-
* at::CUDA(at::kFloat).rand({N, M}),
446-
* at::CUDA(at::kFloat).rand({N})},
447-
* M{M} {}
448-
* void Run() {
449-
* tc::ATenCompilationUnit<tc::CudaTcExecutor> atCompl;
450-
* atCompl.define(tc_);
451-
* std::vector<at::Tensor> outputs_;
452-
* atCompl.run(
453-
* "fcrelu",
454-
* inputs_,
455-
* outputs_,
456-
* tc::CudaMappingOptions::makeMlpMappingOptions(), true);
457-
* at::Tensor diff =
458-
* outputs_[0].sub(inputs_[0].mm(inputs_[1]).add(inputs_[2]).clamp_min(0));
459-
* checkRtol(diff, inputs_, M);
460-
* }
461-
*
462-
* private:
463-
* std::vector<at::Tensor> inputs_;
464-
* int M;
465-
* static constexpr auto tc_ = R"(
466-
* def fcrelu(float(B,M) I, float(N,M) W1, float(N) B1) -> (O1) {
467-
* O1(b, n) += I(b, m) * W1(n, m)
468-
* O1(b, n) = O1(b, n) + B1(n)
469-
* O1(b, n) = fmax(O1(b, n), 0)
470-
* })";
471-
*};
472-
*/
473-
474440
class MatMulTester {
475441
public:
476442
MatMulTester(int N, int M, int B)
@@ -547,7 +513,6 @@ class CompilationCacheTest : public ::testing::Test {
547513
ASSERT_EQ(tc::OptionsCache::getCache()->numberSuccessfulRetrievals, 0);
548514
ASSERT_EQ(tc::OptionsCache::getCache()->numberCacheAttemps, 0);
549515

550-
// test0.Run();
551516
test1.Run();
552517
test2.Run();
553518

@@ -563,15 +528,11 @@ class CompilationCacheTest : public ::testing::Test {
563528
ASSERT_FALSE(tc::OptionsCache::cacheEnabled());
564529
}
565530

566-
// FCReluTester test0{8, 16, 16};
567531
MatMulTester test1{8, 32, 16};
568532
ConvolutionTester test2{1, 1, 1, 2, 2, 1, 1};
569533
};
570534

571535
TEST_F(CompilationCacheTest, ExpectQuerySuccess) {
572-
// FCReluTester test0{8, 16, 16};
573-
// test0.Run();
574-
575536
MatMulTester test1{8, 32, 16};
576537
test1.Run();
577538

@@ -586,13 +547,6 @@ TEST_F(CompilationCacheTest, ExpectQuerySuccess) {
586547
}
587548

588549
TEST_F(CompilationCacheTest, ExpectQuerySuccessConcurrent) {
589-
/*
590-
* auto fut0 = std::async(std::launch::async, []() {
591-
* FCReluTester test0{8, 16, 16};
592-
* test0.Run();
593-
* });
594-
*
595-
*/
596550
auto fut1 = std::async(std::launch::async, []() {
597551
MatMulTester test1{8, 32, 16};
598552
test1.Run();
@@ -603,7 +557,6 @@ TEST_F(CompilationCacheTest, ExpectQuerySuccessConcurrent) {
603557
test2.Run();
604558
});
605559

606-
// fut0.get();
607560
fut1.get();
608561
fut2.get();
609562

@@ -615,9 +568,6 @@ TEST_F(CompilationCacheTest, ExpectQuerySuccessConcurrent) {
615568
}
616569

617570
TEST_F(CompilationCacheTest, ShapesNotPresentInCache) {
618-
// FCReluTester test0{10, 16, 16};
619-
// test0.Run();
620-
621571
MatMulTester test1{12, 32, 16};
622572
test1.Run();
623573

@@ -631,11 +581,6 @@ TEST_F(CompilationCacheTest, ShapesNotPresentInCache) {
631581
ASSERT_EQ(tc::OptionsCache::getCache()->numberCacheAttemps, 4);
632582
}
633583
TEST_F(CompilationCacheTest, ShapesNotPresentInCacheConcurrent) {
634-
// auto fut0 = std::async(std::launch::async, []() {
635-
// FCReluTester test0{10, 16, 16};
636-
// test0.Run();
637-
//});
638-
639584
auto fut1 = std::async(std::launch::async, []() {
640585
MatMulTester test1{12, 32, 16};
641586
test1.Run();
@@ -646,7 +591,6 @@ TEST_F(CompilationCacheTest, ShapesNotPresentInCacheConcurrent) {
646591
test2.Run();
647592
});
648593

649-
// fut0.get();
650594
fut1.get();
651595
fut2.get();
652596

@@ -658,11 +602,6 @@ TEST_F(CompilationCacheTest, ShapesNotPresentInCacheConcurrent) {
658602
}
659603

660604
TEST_F(CompilationCacheTest, ModifyIslOptions) {
661-
// FCReluTester test0{8, 16, 16};
662-
// test0.ModifyParameters(
663-
//{tc::Tile{4}, tc::Block{128}, tc::Grid{1}, tc::Unroll{1}});
664-
// test0.Run();
665-
666605
MatMulTester test1{8, 32, 16};
667606
auto options = tc::CudaMappingOptions::makeMlpMappingOptions()
668607
.tile(1, 1, 1)
@@ -687,13 +626,6 @@ TEST_F(CompilationCacheTest, ModifyIslOptions) {
687626
}
688627

689628
TEST_F(CompilationCacheTest, ModifyIslOptionsConcurrent) {
690-
// auto fut0 = std::async(std::launch::async, []() {
691-
// FCReluTester test0{8, 16, 16};
692-
// test0.ModifyParameters(
693-
//{tc::Tile{4}, tc::Block{128}, tc::Grid{1}, tc::Unroll{1}});
694-
// test0.Run();
695-
//});
696-
697629
auto fut1 = std::async(std::launch::async, []() {
698630
MatMulTester test1{8, 32, 16};
699631
auto options = tc::CudaMappingOptions::makeMlpMappingOptions()
@@ -714,7 +646,6 @@ TEST_F(CompilationCacheTest, ModifyIslOptionsConcurrent) {
714646
test2.Run(options);
715647
});
716648

717-
// fut0.get();
718649
fut1.get();
719650
fut2.get();
720651

@@ -737,11 +668,6 @@ TEST_F(CompilationCacheTest, Serialization) {
737668
ASSERT_EQ(tc::OptionsCache::getCache()->numberSuccessfulRetrievals, 0);
738669
ASSERT_EQ(tc::OptionsCache::getCache()->numberCacheAttemps, 0);
739670

740-
/*
741-
*FCReluTester test0{8, 16, 16};
742-
*test0.Run();
743-
*/
744-
745671
MatMulTester test1{8, 32, 16};
746672
test1.Run();
747673

0 commit comments

Comments
 (0)