We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82924d2 commit 41c6491Copy full SHA for 41c6491
src/torchcodec/decoders/_core/VideoDecoderOps.cpp
@@ -168,7 +168,7 @@ void _add_video_stream(
168
if (device.has_value()) {
169
if (device.value() == "cpu") {
170
options.device = torch::Device(torch::kCPU);
171
- } else if (device.value().starts_with("cuda")) {
+ } else if (device.value().rfind("cuda", 0) == 0) { // starts with "cuda"
172
std::string deviceStr(device.value());
173
options.device = torch::Device(deviceStr);
174
} else {
0 commit comments