With 0.11.1 torchcodec.
|
std::unique_ptr<DeviceInterface> createDeviceInterface( |
The createDeviceInterface() API lacks public visibility causing load errors for accelerator plugins who attempt to use it:
OSError: /localdisk/dmitry/git/torchlib-xpu/.venv/lib/python3.14/site-packages/torchcodec_xpu/xpu_ops6.cpython-314-x86_64-linux-gnu.so: undefined symbol: _ZN8facebook10torchcodec21createDeviceInterfaceERKN5torch6stable6DeviceESt17basic_string_viewIcSt11char_traitsIcEE
This API is needed to create CPU device interface to implement CPU fallback in the corner cases when underlying accelerator device does not support some codecs or codec features. Similar to the following handling in CUDA device interface:
|
cpuInterface_ = createDeviceInterface(kStableCPU); |
|
STD_TORCH_CHECK( |
|
cpuInterface_ != nullptr, "Failed to create CPU device interface"); |
|
cpuInterface_->initialize(avStream, avFormatCtx, codecContext); |
|
cpuInterface_->initializeVideo( |
|
VideoStreamOptions(), |
|
{}, |
|
/*resizedOutputDims=*/std::nullopt); |
CC: @NicolasHug @eromomon
With 0.11.1 torchcodec.
torchcodec/src/torchcodec/_core/DeviceInterface.h
Line 183 in 2b49b20
The
createDeviceInterface()API lacks public visibility causing load errors for accelerator plugins who attempt to use it:This API is needed to create CPU device interface to implement CPU fallback in the corner cases when underlying accelerator device does not support some codecs or codec features. Similar to the following handling in CUDA device interface:
torchcodec/src/torchcodec/_core/CudaDeviceInterface.cpp
Lines 120 to 127 in 2b49b20
CC: @NicolasHug @eromomon