Skip to content

Commit 756060c

Browse files
committed
Address some TODOs
1 parent 61202b9 commit 756060c

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

src/torchcodec/_core/BetaCudaDeviceInterface.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ BetaCudaDeviceInterface::~BetaCudaDeviceInterface() {
221221
}
222222

223223
if (videoParser_) {
224-
// TODONVDEC P2: consider caching this? Does DALI do that?
225224
cuvidDestroyVideoParser(videoParser_);
226225
videoParser_ = nullptr;
227226
}

src/torchcodec/_core/NVDECCache.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ class NVDECCache {
6868
CacheKey(const CacheKey&) = default;
6969
CacheKey& operator=(const CacheKey&) = default;
7070

71-
// TODONVDEC P2: we only implement operator< which is enough for std::map,
72-
// but:
73-
// - we should consider using std::unordered_map
74-
// - we should consider a more sophisticated and potentially less strict
75-
// cache key comparison logic
71+
// TODONVDEC P2: consider a more sophisticated and potentially
72+
// less strict cache key comparison logic
7673
bool operator<(const CacheKey& other) const {
7774
return std::tie(
7875
codecType,

src/torchcodec/decoders/_video_decoder.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ def __init__(
145145

146146
# If device looks like "cuda:0:beta", make it "cuda:0" and set
147147
# device_variant to "beta"
148-
# TODONVDEC P2 Consider alternative ways of exposing custom device
149-
# variants, and if we want this new decoder backend to be a "device
150-
# variant" at all.
151148
device_variant = "default"
152149
if device is not None:
153150
device_split = device.split(":")

test/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def sample_format(self) -> str:
750750

751751

752752
def supports_approximate_mode(asset: TestVideo) -> bool:
753-
# TODONVDEC P2: open an issue about his. That's actually not related to
754-
# NVDEC at all, those don't support approximate mode because they don't set
755-
# a duration. CPU decoder fails too!
753+
# Those are missing the `duration` field so they fail in approximate mode (on all devices).
754+
# TODO: we should address this, see
755+
# https://github.com/meta-pytorch/torchcodec/issues/945
756756
return asset not in (AV1_VIDEO, TEST_SRC_2_720P_VP9, TEST_SRC_2_720P_VP8)

0 commit comments

Comments
 (0)