Skip to content

Commit

Permalink
Add warning about pin_memory option
Browse files Browse the repository at this point in the history
  • Loading branch information
mthrok committed Oct 4, 2024
1 parent b74e902 commit c9cf14d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libspdl/core/conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

namespace spdl::core {

// The actual implementation is found in
// detail/ffmpeg/conversion.cpp
template <MediaType media_type>
CPUBufferPtr convert_frames(
const std::vector<const FFmpegFrames<media_type>*>& batch,
Expand Down
2 changes: 2 additions & 0 deletions src/libspdl/core/storage/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CPUStorage::CPUStorage(size_t size, bool pin_memory) {
LOG(WARNING)
<< "`pin_memory` requires SPDL with CUDA support. Falling back to CPU memory.";
#else
LOG(WARNING)
<< "`pin_memory` is under development and is currently known to be slower and unstable";
CHECK_CUDA(
cudaHostAlloc(&data_, size, cudaHostAllocDefault),
"Failed to allocate pinned memory.");
Expand Down

0 comments on commit c9cf14d

Please sign in to comment.