mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-09 17:28:58 +00:00
disable warning C4100 unreferenced formal parameter
This commit is contained in:
parent
16f0e087a3
commit
2b214ff2bd
1 changed files with 8 additions and 0 deletions
|
|
@ -136,12 +136,20 @@ class PoolAllocator : public nvinfer1::IGpuAsyncAllocator {
|
|||
cudaMemPoolSetAttribute(mPool, cudaMemPoolAttrReleaseThreshold, &maxThreshold);
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4100)
|
||||
#endif
|
||||
void* allocateAsync(uint64_t const size, uint64_t const alignment, nvinfer1::AllocatorFlags const flags,
|
||||
cudaStream_t stream) noexcept override {
|
||||
void* memory{nullptr};
|
||||
cudaMallocFromPoolAsync(&memory, size, mPool, stream);
|
||||
return memory;
|
||||
}
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
bool deallocateAsync(void* const memory, cudaStream_t stream) noexcept override {
|
||||
cudaFreeAsync(memory, stream);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue