Hi, all, I tried to extend C++ ops for pytorch follow this tutorial https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html 7. But I got this error, "op.cpp:17:50: error: ‘class at::Tensor’ has no member named ‘ptr’ ".
what I do as follow:

download pytorch C++ form https://download.pytorch.org/libtorch/cu90/libtorch-shared-with-deps-latest.zip

add a cmake to find the lib and include directory as this file:

include(FindPackageHandleStandardArgs)
set(TORCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libtorch/include)

find_library(TORCH_LIBRARY
       NAMES torch
       PATHS ${CMAKE_CURRENT_SOURCE_DIR}/libtorch/lib NO_DEFAULT_PATH)

find_package_handle_standard_args(torch TORCH_INCLUDE_DIR TORCH_LIBRARY)


in CMakeList, I add like these:

cmake_minimum_required(VERSION&#32;3.1&#32;FATAL_ERROR)
project(warp_perspective)

add_compile_options(-std=c++11)

list(APPEND&#32;CMAKE_MODULE_PATH&#32;"${CMAKE_CURRENT_SOURCE_DIR}/cmake")

find_package(Torch&#32;REQUIRED)
find_package(OpenCV&#32;REQUIRED)

include_directories(
&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;"${TORCH_INCLUDE_DIR}"
)

#&#32;Define&#32;our&#32;library&#32;target
add_library(warp_perspective&#32;SHARED&#32;op.cpp)
#&#32;Enable&#32;C++11
target_compile_features(warp_perspective&#32;PRIVATE&#32;cxx_range_for)
#&#32;Link&#32;against&#32;LibTorch
target_link_libraries(warp_perspective&#32;"${TORCH_LIBRARIES}")
#&#32;Link&#32;against&#32;OpenCV
target_link_libraries(warp_perspective&#32;opencv_core&#32;opencv_imgproc)


then the compile error show

op.cpp:17:50: error: ‘class at::Tensor’ has no member named ‘ptr’