فهرست منبع

Remove contiguous checks

Tri Dao 7 ماه پیش
والد
کامیت
5d5bfbb619
1فایلهای تغییر یافته به همراه0 افزوده شده و 4 حذف شده
  1. 0 4
      hopper/flash_api.cpp

+ 0 - 4
hopper/flash_api.cpp

@@ -287,10 +287,6 @@ mha_fwd(at::Tensor &q,         // batch_size x seqlen_q x num_heads x head_size
     TORCH_CHECK(k.stride(-1) == 1, "Input tensor must have contiguous last dimension");
     TORCH_CHECK(v.stride(-1) == 1, "Input tensor must have contiguous last dimension");
 
-    TORCH_CHECK(q.is_contiguous(), "Input tensor must be contiguous");
-    TORCH_CHECK(k.is_contiguous(), "Input tensor must be contiguous");
-    TORCH_CHECK(v.is_contiguous(), "Input tensor must be contiguous");
-
     const auto sizes = q.sizes();
 
     const int batch_size = sizes[0];