File tree 1 file changed +6
-9
lines changed
torchvision/csrc/cpu/video_reader 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -661,12 +661,9 @@ torch::List<torch::Tensor> probeVideoFromFile(std::string videoPath) {
661
661
662
662
} // namespace video_reader
663
663
664
- static auto registry = torch::RegisterOperators()
665
- .op(" video_reader::read_video_from_memory" ,
666
- &video_reader::readVideoFromMemory)
667
- .op(" video_reader::read_video_from_file" ,
668
- &video_reader::readVideoFromFile)
669
- .op(" video_reader::probe_video_from_memory" ,
670
- &video_reader::probeVideoFromMemory)
671
- .op(" video_reader::probe_video_from_file" ,
672
- &video_reader::probeVideoFromFile);
664
+ TORCH_LIBRARY_FRAGMENT (video_reader, m) {
665
+ m.def (" read_video_from_memory" , video_reader::readVideoFromMemory);
666
+ m.def (" read_video_from_file" , video_reader::readVideoFromFile);
667
+ m.def (" probe_video_from_memory" , video_reader::probeVideoFromMemory);
668
+ m.def (" probe_video_from_file" , video_reader::probeVideoFromFile);
669
+ }
You can’t perform that action at this time.
0 commit comments