NVIDIA/GMAT

Compile issues in the libavfilter/vf_pose.cpp

hmdtb opened this issue · 1 comments

hmdtb commented

Hi,

While it seems that all the required files and libraries are correctly included, I face many compile issues within the libavfilter/vf_pose.cpp file. Any help will be appreciated.

/usr/include/eigen3/Eigen/src/Core/Matrix.h:259:25: note: candidate expects 0 arguments, 1 provided
libavfilter/vf_pose.cpp: In function 'void load_ort(OrtContext*, char*, std::array<long int, 3>)':
libavfilter/vf_pose.cpp:208:51: error: no matching function for call to 'OrtCUDAProviderOptions::OrtCUDAProviderOptions()'
208 | OrtCUDAProviderOptions cuda_provider_options{0};
| ^
In file included from /volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_cxx_api.h:16,
from libavfilter/vf_pose.cpp:34:
/volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h:351:3: note: candidate: 'OrtCUDAProviderOptions::OrtCUDAProviderOptions()'
351 | OrtCUDAProviderOptions() : device_id{}, cudnn_conv_algo_search{OrtCudnnConvAlgoSearchExhaustive}, gpu_mem_limit{SIZE_MAX}, arena_extend_strategy{}, do_copy_in_default_stream{1}, has_user_compute_stream{}, user_compute_stream{}, default_memory_arena_cfg{} {}
| ^~~~~~~~~~~~~~~~~~~~~~
/volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h:351:3: note: candidate expects 0 arguments, 1 provided
/volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h:349:16: note: candidate: 'constexpr OrtCUDAProviderOptions::OrtCUDAProviderOptions(const OrtCUDAProviderOptions&)'
349 | typedef struct OrtCUDAProviderOptions {
| ^~~~~~~~~~~~~~~~~~~~~~
/volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h:349:16: note: no known conversion for argument 1 from 'int' to 'const OrtCUDAProviderOptions&'
/volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h:349:16: note: candidate: 'constexpr OrtCUDAProviderOptions::OrtCUDAProviderOptions(OrtCUDAProviderOptions&&)'
/volumes2/optimizations/video-sdk/FFmpeg-GPU-Demo/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h:349:16: note: no known conversion for argument 1 from 'int' to 'OrtCUDAProviderOptions&&'
libavfilter/vf_pose.cpp:209:52: error: 'EXHAUSTIVE' was not declared in this scope
209 | cuda_provider_options.cudnn_conv_algo_search = EXHAUSTIVE;
| ^~~~~~~~~~
libavfilter/vf_pose.cpp:194:17: warning: unused variable 'api' [-Wunused-variable]
194 | const auto& api = Ort::GetApi();
| ^~~
libavfilter/vf_pose.cpp:197:17: warning: unused variable 'keys' [-Wunused-variable]
197 | const char* keys[] = {"max_mem", "arena_extend_strategy", "initial_chunk_size_bytes", "max_dead_bytes_per_chunk", "initial_growth_chunk_size_bytes"};
| ^~~~
libavfilter/vf_pose.cpp:198:18: warning: unused variable 'values' [-Wunused-variable]
198 | const size_t values[] = {0 /let ort pick default max memory/, 0, 1024, 0, 256};
| ^~~~~~
libavfilter/vf_pose.cpp:207:13: warning: unused variable 'env_ptr' [-Wunused-variable]
207 | OrtEnv* env_ptr = (OrtEnv*)(env);
| ^~~~~~~
libavfilter/vf_pose.cpp: In function 'int transform_and_draw_mask(PoseContext*, AVFrame*, AVFrame*, float*, int, float*, CudaFunctions*, CUcontext, int, int, float)':
libavfilter/vf_pose.cpp:572:16: warning: unused variable 'tex_array' [-Wunused-variable]
572 | cudaArray tex_array;
| ^~~~~~~~~
libavfilter/vf_pose.cpp: In function 'int filter_frame(AVFilterLink
, AVFrame*)':
libavfilter/vf_pose.cpp:763:62: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
763 | transform_and_draw_mask(s, in, out, dofs_out.data(), dofs_out.sizes()[0],

hmdtb commented

Issue solved.