Skip to content

Commit

Permalink
AT_CHECK to TORCH_CHECK - PyTorch 1.5 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
adambielski committed Jun 26, 2020
1 parent b2a1e6c commit 5cc8574
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions neural_renderer/cuda/create_texture_image_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ at::Tensor create_texture_image_cuda(

// C++ interface

#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)


Expand Down
4 changes: 2 additions & 2 deletions neural_renderer/cuda/load_textures_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ at::Tensor load_textures_cuda(

// C++ interface

#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)


Expand Down
4 changes: 2 additions & 2 deletions neural_renderer/cuda/rasterize_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ at::Tensor backward_depth_map_cuda(

// C++ interface

#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)

std::vector<at::Tensor> forward_face_index_map(
Expand Down

0 comments on commit 5cc8574

Please sign in to comment.