Skip to content

Commit 49dec7f

Browse files
authored
GPU Metal: accept the registration of host memory (#16067)
1 parent 2ecb908 commit 49dec7f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎GPU/GPUTracking/Base/metal/GPUReconstructionMetal.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ class GPUReconstructionMetal : public GPUReconstructionProcessing::KernelInterfa
4646
size_t GPUMemCpy(void* dst, const void* src, size_t size, int32_t stream, int32_t toGPU, deviceEvent* ev = nullptr, deviceEvent* evList = nullptr, int32_t nEvents = 1) override;
4747
void ReleaseEvent(deviceEvent ev) override;
4848
void RecordMarker(deviceEvent* ev, int32_t stream) override;
49+
// The memory is shared with the host, and GPUMemCpy copies from memory outside the Metal buffers on the
50+
// host, so there is nothing to pin.
51+
int32_t registerMemoryForGPU_internal(const void* ptr, size_t size) override { return 0; }
52+
int32_t unregisterMemoryForGPU_internal(const void* ptr) override { return 0; }
4953

5054
template <class T, int32_t I = 0>
5155
int32_t AddKernel();

0 commit comments

Comments
 (0)