Skip to content

Commit d3f27c9

Browse files
author
wangg12
committed
AT_CHECK
1 parent 55a05a2 commit d3f27c9

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ __pycache__/
66

77
# C extensions
88
*.so
9+
*.ninja*
10+
*.o
911

1012
# Distribution / packaging
1113
.Python

neural_renderer/cuda/create_texture_image_cuda.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ at::Tensor create_texture_image_cuda(
1010

1111
// C++ interface
1212

13-
#define CHECK_CUDA(x) AT_ASSERT(x.type().is_cuda(), #x " must be a CUDA tensor")
14-
#define CHECK_CONTIGUOUS(x) AT_ASSERT(x.is_contiguous(), #x " must be contiguous")
13+
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
14+
#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
1515
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
1616

1717

neural_renderer/cuda/load_textures_cuda.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ at::Tensor load_textures_cuda(
1212

1313
// C++ interface
1414

15-
#define CHECK_CUDA(x) AT_ASSERT(x.type().is_cuda(), #x " must be a CUDA tensor")
16-
#define CHECK_CONTIGUOUS(x) AT_ASSERT(x.is_contiguous(), #x " must be contiguous")
15+
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
16+
#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
1717
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
1818

1919

neural_renderer/cuda/rasterize_cuda.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ at::Tensor backward_depth_map_cuda(
6363

6464
// C++ interface
6565

66-
#define CHECK_CUDA(x) AT_ASSERT(x.type().is_cuda(), #x " must be a CUDA tensor")
67-
#define CHECK_CONTIGUOUS(x) AT_ASSERT(x.is_contiguous(), #x " must be contiguous")
66+
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
67+
#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
6868
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
6969

7070
std::vector<at::Tensor> forward_face_index_map(

0 commit comments

Comments
 (0)