From 44278554de1081b173f2360c3cd1fe04060aac68 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Fri, 17 Jun 2022 15:30:55 -0500 Subject: [PATCH] Add format script. Adds a script to run clang-format on the latest patch so we don't need to remember the command line. Also applies missing formatting to the prior commit, "Add API for available GPU memory". Change-Id: Ida51aedc38af229f6a26e275072654860748fa93 [ROCm/ROCR-Runtime commit: e7152c8b16bea7d6a992620380079160ba1502de] --- .../runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 138cd008b6..138b983911 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -1038,11 +1038,9 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { status = hsaKmtAvailableMemory(node_id(), &availableBytes); - if (status != HSAKMT_STATUS_SUCCESS) - return HSA_STATUS_ERROR_INVALID_ARGUMENT; + if (status != HSAKMT_STATUS_SUCCESS) return HSA_STATUS_ERROR_INVALID_ARGUMENT; - for (auto r: regions()) - availableBytes += ((AMD::MemoryRegion*)r)->GetCacheSize(); + for (auto r : regions()) availableBytes += ((AMD::MemoryRegion*)r)->GetCacheSize(); availableBytes += scratch_cache_.free_bytes();