From 2b214ff2bd913a0db906ba1cf764d504573a40f8 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Thu, 30 Jan 2025 01:07:45 +0000 Subject: [PATCH] disable warning C4100 unreferenced formal parameter --- .../core/providers/tensorrt/tensorrt_execution_provider.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.h b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.h index 5bf1bc35e9..2fae4433ac 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.h +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.h @@ -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;