@@ -437,40 +437,6 @@ TEST_F(OptionsCacheTest, Serialization) {
437
437
ASSERT_EQ (tc::OptionsCache::getCache ()->numberCacheAttemps , 0 );
438
438
}
439
439
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
-
474
440
class MatMulTester {
475
441
public:
476
442
MatMulTester (int N, int M, int B)
@@ -547,7 +513,6 @@ class CompilationCacheTest : public ::testing::Test {
547
513
ASSERT_EQ (tc::OptionsCache::getCache ()->numberSuccessfulRetrievals , 0 );
548
514
ASSERT_EQ (tc::OptionsCache::getCache ()->numberCacheAttemps , 0 );
549
515
550
- // test0.Run();
551
516
test1.Run ();
552
517
test2.Run ();
553
518
@@ -563,15 +528,11 @@ class CompilationCacheTest : public ::testing::Test {
563
528
ASSERT_FALSE (tc::OptionsCache::cacheEnabled ());
564
529
}
565
530
566
- // FCReluTester test0{8, 16, 16};
567
531
MatMulTester test1{8 , 32 , 16 };
568
532
ConvolutionTester test2{1 , 1 , 1 , 2 , 2 , 1 , 1 };
569
533
};
570
534
571
535
TEST_F (CompilationCacheTest, ExpectQuerySuccess) {
572
- // FCReluTester test0{8, 16, 16};
573
- // test0.Run();
574
-
575
536
MatMulTester test1{8 , 32 , 16 };
576
537
test1.Run ();
577
538
@@ -586,13 +547,6 @@ TEST_F(CompilationCacheTest, ExpectQuerySuccess) {
586
547
}
587
548
588
549
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
- */
596
550
auto fut1 = std::async (std::launch::async, []() {
597
551
MatMulTester test1{8 , 32 , 16 };
598
552
test1.Run ();
@@ -603,7 +557,6 @@ TEST_F(CompilationCacheTest, ExpectQuerySuccessConcurrent) {
603
557
test2.Run ();
604
558
});
605
559
606
- // fut0.get();
607
560
fut1.get ();
608
561
fut2.get ();
609
562
@@ -615,9 +568,6 @@ TEST_F(CompilationCacheTest, ExpectQuerySuccessConcurrent) {
615
568
}
616
569
617
570
TEST_F (CompilationCacheTest, ShapesNotPresentInCache) {
618
- // FCReluTester test0{10, 16, 16};
619
- // test0.Run();
620
-
621
571
MatMulTester test1{12 , 32 , 16 };
622
572
test1.Run ();
623
573
@@ -631,11 +581,6 @@ TEST_F(CompilationCacheTest, ShapesNotPresentInCache) {
631
581
ASSERT_EQ (tc::OptionsCache::getCache ()->numberCacheAttemps , 4 );
632
582
}
633
583
TEST_F (CompilationCacheTest, ShapesNotPresentInCacheConcurrent) {
634
- // auto fut0 = std::async(std::launch::async, []() {
635
- // FCReluTester test0{10, 16, 16};
636
- // test0.Run();
637
- // });
638
-
639
584
auto fut1 = std::async (std::launch::async, []() {
640
585
MatMulTester test1{12 , 32 , 16 };
641
586
test1.Run ();
@@ -646,7 +591,6 @@ TEST_F(CompilationCacheTest, ShapesNotPresentInCacheConcurrent) {
646
591
test2.Run ();
647
592
});
648
593
649
- // fut0.get();
650
594
fut1.get ();
651
595
fut2.get ();
652
596
@@ -658,11 +602,6 @@ TEST_F(CompilationCacheTest, ShapesNotPresentInCacheConcurrent) {
658
602
}
659
603
660
604
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
-
666
605
MatMulTester test1{8 , 32 , 16 };
667
606
auto options = tc::CudaMappingOptions::makeMlpMappingOptions ()
668
607
.tile (1 , 1 , 1 )
@@ -687,13 +626,6 @@ TEST_F(CompilationCacheTest, ModifyIslOptions) {
687
626
}
688
627
689
628
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
-
697
629
auto fut1 = std::async (std::launch::async, []() {
698
630
MatMulTester test1{8 , 32 , 16 };
699
631
auto options = tc::CudaMappingOptions::makeMlpMappingOptions ()
@@ -714,7 +646,6 @@ TEST_F(CompilationCacheTest, ModifyIslOptionsConcurrent) {
714
646
test2.Run (options);
715
647
});
716
648
717
- // fut0.get();
718
649
fut1.get ();
719
650
fut2.get ();
720
651
@@ -737,11 +668,6 @@ TEST_F(CompilationCacheTest, Serialization) {
737
668
ASSERT_EQ (tc::OptionsCache::getCache ()->numberSuccessfulRetrievals , 0 );
738
669
ASSERT_EQ (tc::OptionsCache::getCache ()->numberCacheAttemps , 0 );
739
670
740
- /*
741
- *FCReluTester test0{8, 16, 16};
742
- *test0.Run();
743
- */
744
-
745
671
MatMulTester test1{8 , 32 , 16 };
746
672
test1.Run ();
747
673
0 commit comments