From 75a3e092fce5ca35e842208fb22afb0b95e3cad1 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Fri, 4 Oct 2024 15:11:32 +0200 Subject: [PATCH] [LLVMAnalyzer][Heterogeneous] Remove dead assignments --- HeterogeneousCore/CUDAUtilities/src/CachingDeviceAllocator.h | 2 +- HeterogeneousCore/CUDAUtilities/src/CachingHostAllocator.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/HeterogeneousCore/CUDAUtilities/src/CachingDeviceAllocator.h b/HeterogeneousCore/CUDAUtilities/src/CachingDeviceAllocator.h index 9b164c42921d1..624be41287843 100644 --- a/HeterogeneousCore/CUDAUtilities/src/CachingDeviceAllocator.h +++ b/HeterogeneousCore/CUDAUtilities/src/CachingDeviceAllocator.h @@ -425,7 +425,7 @@ namespace notcub { // Attempt to allocate // CMS: silently ignore errors and retry or pass them to the caller - if ((error = cudaMalloc(&search_key.d_ptr, search_key.bytes)) == cudaErrorMemoryAllocation) { + if (cudaMalloc(&search_key.d_ptr, search_key.bytes) == cudaErrorMemoryAllocation) { // The allocation attempt failed: free all cached blocks on device and retry if (debug) // CMS: use raw printf diff --git a/HeterogeneousCore/CUDAUtilities/src/CachingHostAllocator.h b/HeterogeneousCore/CUDAUtilities/src/CachingHostAllocator.h index 49ba4d0e73f2b..e68b4d1b0f44a 100644 --- a/HeterogeneousCore/CUDAUtilities/src/CachingHostAllocator.h +++ b/HeterogeneousCore/CUDAUtilities/src/CachingHostAllocator.h @@ -396,8 +396,7 @@ namespace notcub { if (!found) { // Attempt to allocate // TODO: eventually support allocation flags - if ((error = cudaHostAlloc(&search_key.d_ptr, search_key.bytes, cudaHostAllocDefault)) == - cudaErrorMemoryAllocation) { + if (cudaHostAlloc(&search_key.d_ptr, search_key.bytes, cudaHostAllocDefault) == cudaErrorMemoryAllocation) { // The allocation attempt failed: free all cached blocks on device and retry if (debug) printf(