From 5cc85740240226b6db9e48d5e5089b4e41681a2c Mon Sep 17 00:00:00 2001 From: Adam Bielski <14027793+adambielski@users.noreply.github.com> Date: Fri, 26 Jun 2020 12:40:33 +0200 Subject: [PATCH] AT_CHECK to TORCH_CHECK - PyTorch 1.5 compatible --- neural_renderer/cuda/create_texture_image_cuda.cpp | 4 ++-- neural_renderer/cuda/load_textures_cuda.cpp | 4 ++-- neural_renderer/cuda/rasterize_cuda.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/neural_renderer/cuda/create_texture_image_cuda.cpp b/neural_renderer/cuda/create_texture_image_cuda.cpp index c2c449d..85d287f 100644 --- a/neural_renderer/cuda/create_texture_image_cuda.cpp +++ b/neural_renderer/cuda/create_texture_image_cuda.cpp @@ -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) diff --git a/neural_renderer/cuda/load_textures_cuda.cpp b/neural_renderer/cuda/load_textures_cuda.cpp index 8cb99bc..5e26a54 100644 --- a/neural_renderer/cuda/load_textures_cuda.cpp +++ b/neural_renderer/cuda/load_textures_cuda.cpp @@ -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) diff --git a/neural_renderer/cuda/rasterize_cuda.cpp b/neural_renderer/cuda/rasterize_cuda.cpp index ce7a3e5..7ecebd3 100644 --- a/neural_renderer/cuda/rasterize_cuda.cpp +++ b/neural_renderer/cuda/rasterize_cuda.cpp @@ -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 forward_face_index_map(