preprocessing: a buffer someone else page-locked is already what we wanted
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 9m18s
Build Packages / build:windows:nocuda (push) Successful in 16m55s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 19m16s
Build Packages / build:windows:cuda (push) Successful in 20m1s
Build Packages / build:viewer-tgz:cpu (push) Successful in 22m5s
Build Packages / build:viewer-tgz:cuda (push) Successful in 22m7s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 23m4s
Build Packages / build:rugnux:windows (push) Successful in 11m28s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 28m15s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 28m25s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 19m49s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 22m27s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 26m45s
Build Packages / build:rpm (rocky9) (push) Successful in 23m23s
Build Packages / build:rpm (rocky8) (push) Successful in 28m7s
Build Packages / Generate python client (push) Successful in 32s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 23m5s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 58s
Build Packages / XDS test (durin plugin) (push) Successful in 10m23s
Build Packages / DIALS test (push) Successful in 25m58s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 27m30s
Build Packages / XDS test (neggia plugin) (push) Successful in 10m3s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m53s
Build Packages / Unit tests (push) Successful in 2h7m2s
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 9m18s
Build Packages / build:windows:nocuda (push) Successful in 16m55s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 19m16s
Build Packages / build:windows:cuda (push) Successful in 20m1s
Build Packages / build:viewer-tgz:cpu (push) Successful in 22m5s
Build Packages / build:viewer-tgz:cuda (push) Successful in 22m7s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 23m4s
Build Packages / build:rugnux:windows (push) Successful in 11m28s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 28m15s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 28m25s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 19m49s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 22m27s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 26m45s
Build Packages / build:rpm (rocky9) (push) Successful in 23m23s
Build Packages / build:rpm (rocky8) (push) Successful in 28m7s
Build Packages / Generate python client (push) Successful in 32s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 23m5s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 58s
Build Packages / XDS test (durin plugin) (push) Successful in 10m23s
Build Packages / DIALS test (push) Successful in 25m58s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 27m30s
Build Packages / XDS test (neggia plugin) (push) Successful in 10m3s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m53s
Build Packages / Unit tests (push) Successful in 2h7m2s
The uncompressed-image upload page-locks the caller's bytes, which is right when the caller allocated them for us and wrong when it did not: the online receiver registers its image buffer once and hands out ranges inside it, and registering a range a second time is an error rather than a no-op, so the first frame aborted the collection. An already-registered range needs nothing done to it - the upload is a DMA either way - and it is not ours to unregister when this object is destroyed, so it is deliberately not remembered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -352,7 +352,16 @@ void ImagePreprocessorGPU::PinInputRegion(const void *ptr, size_t bytes) {
|
||||
cuda_err(cudaHostUnregister(const_cast<void *>(pinned_input)));
|
||||
pinned_input = nullptr;
|
||||
pinned_input_bytes = 0;
|
||||
cuda_err(cudaHostRegister(const_cast<void *>(ptr), bytes, cudaHostRegisterDefault));
|
||||
// The buffer may already be page-locked by whoever owns it - the receiver registers its image
|
||||
// buffer once and hands out ranges inside it - and registering a range twice is an error rather
|
||||
// than a no-op. There is nothing to do in that case: the upload is already a DMA, and the
|
||||
// region is not ours to unregister later, so it is deliberately not remembered.
|
||||
const auto err = cudaHostRegister(const_cast<void *>(ptr), bytes, cudaHostRegisterDefault);
|
||||
if (err == cudaErrorHostMemoryAlreadyRegistered) {
|
||||
cudaGetLastError();
|
||||
return;
|
||||
}
|
||||
cuda_err(err);
|
||||
pinned_input = ptr;
|
||||
pinned_input_bytes = bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user