test/cuda/test_tc_mapper_bugs.cc
// This case was observed when running the autotuner on example_MLP_model
// (#200).  It calls code generation on a schedule tree containing a
// disjunctive filter, which results in expression with more than one disjunct
// that was not handed properly.
// TODO: the disjunctive filter in the schedule is unexpected and its origin
// should be identified and explained.
This case was observed when running the autotuner on example_MLP_model
(#200).  It calls code generation on a schedule tree containing a
disjunctive filter, which results in expression with more than one disjunct
that was not handed properly.
TODO: the disjunctive filter in the schedule is unexpected and its origin
should be identified and explained.
This case was observed when running the autotuner on example_MLP_model ( #200 ) . It calls code generation on a schedule tree containing a disjunctive filter which results in expression with more than one disjunct that was not handed properly . TODO : the disjunctive filter in the schedule is unexpected and its origin should be identified and explained .
TEST(TMM_128_1024_1000, DisjunctiveFilter) {
  at::Tensor I = at::CUDA(at::kFloat).rand({128, 1024});
  at::Tensor W = at::CUDA(at::kFloat).rand({1000, 1024});
  std::vector<at::Tensor> inputs = {I, W};
  std::vector<at::Tensor> outputs;
  auto TC = std::string(R"TC(
def tmm_naive(float(B, X) I, float(Y, X) W) -> (O) {
    O(b, y) +=! I(b, r_x) * W(y, r_x)
}
)TC");
  auto options =
      tc::CudaMappingOptions::makeNaiveCudaMappingOptions()
          .outerScheduleFusionStrategy(tc::FusionStrategy::Preserve3Coincident)
          .outerScheduleAllowSkewing(false)
          .outerSchedulePositiveOrthant(true)
          .intraTileScheduleFusionStrategy(tc::FusionStrategy::Min)
          .intraTileScheduleAllowSkewing(false)
          .intraTileSchedulePositiveOrthant(true)
          .tile(1, 32, 63)
          .mapToThreads(2, 32)
          .mapToBlocks(64, 128, 1024)
          .unroll(128)
          .tileImperfectlyNested(false)
          .useSharedMemory(false)
          .usePrivateMemory(false)
          .unrollCopyShared(false)
          .matchLibraryCalls(true);
  tc::ATenCompilationUnit<tc::CudaTcExecutor> atCompl;
  atCompl.define(TC);
  atCompl.compile("tmm_naive", inputs, options);
}
TEST ( TMM_128_1024_1000 , DisjunctiveFilter ) { at :: Tensor I = at :: CUDA ( at :: kFloat ) . rand ( { 128 , 1024 } ) ; at :: Tensor W = at :: CUDA ( at :: kFloat ) . rand ( { 1000 , 1024 } ) ; std :: vector < at :: Tensor > inputs = { I , W } ; std :: vector < at :: Tensor > outputs ; auto TC = std :: string ( R" TC ( 
def tmm_naive(float(B, X) I, float(Y, X) W) -> (O) {
    O(b, y) +=! I(b, r_x) * W(y, r_x)
}
 ) TC " ) ; auto options = tc :: CudaMappingOptions :: makeNaiveCudaMappingOptions ( ) . outerScheduleFusionStrategy ( tc :: FusionStrategy :: Preserve3Coincident ) . outerScheduleAllowSkewing ( false ) . outerSchedulePositiveOrthant ( true ) . intraTileScheduleFusionStrategy ( tc :: FusionStrategy :: Min ) . intraTileScheduleAllowSkewing ( false ) . intraTileSchedulePositiveOrthant ( true ) . tile ( 1 , 32 , 63 ) . mapToThreads ( 2 , 32 ) . mapToBlocks ( 64 , 128 , 1024 ) . unroll ( 128 ) . tileImperfectlyNested ( false ) . useSharedMemory ( false ) . usePrivateMemory ( false ) . unrollCopyShared ( false ) . matchLibraryCalls ( true ) ; tc :: ATenCompilationUnit < tc :: CudaTcExecutor > atCompl ; atCompl . define ( TC ) ; atCompl . compile ( " " , inputs , options ) ; }
This case was observed when running the autotuner on example_MLP_model
(#200).
This case was observed when running the autotuner on example_MLP_model ( #200 ) .
// Expecting this to compile without dying.