Skip to content

Commit 32802ce

Browse files
committed
Use non-deprecated TORCH_CHECK macro.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
1 parent dd5f390 commit 32802ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

advanced_source/cpp_extension.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,8 @@ We'll start with the C++ file, which we'll call ``lltm_cuda.cpp``, for example:
667667
668668
// C++ interface
669669
670-
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
671-
#define CHECK_CONTIGUOUS(x) AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")
670+
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
671+
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
672672
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
673673
674674
std::vector<torch::Tensor> lltm_forward(

0 commit comments

Comments
 (0)