Skip to content

Commit 9391e5d

Browse files
Final minor change.
Signed-off-by: Wangshanshan <[email protected]>
1 parent 5c032cc commit 9391e5d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cpp/tensorrt_llm/common/opUtils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,28 +247,28 @@ struct MemoryInfo
247247
};
248248

249249
// Helper function to get current memory information
250-
inline MemoryInfo getMemoryInfo()
250+
MemoryInfo getMemoryInfo()
251251
{
252252
size_t free_mem = 0, total_mem = 0;
253253
TLLM_CUDA_CHECK(cudaMemGetInfo(&free_mem, &total_mem));
254254

255-
const size_t free_mb = free_mem / (1024 * 1024);
256-
const size_t total_mb = total_mem / (1024 * 1024);
255+
size_t const free_mb = free_mem / (1024 * 1024);
256+
size_t const total_mb = total_mem / (1024 * 1024);
257257
float const free_percent = (total_mem > 0) ? (static_cast<float>(free_mem) / total_mem * 100.0f) : 0.0f;
258258

259259
return {free_mb, total_mb, free_percent};
260260
}
261261

262262
// Helper function to log current memory usage
263-
inline void logMemoryUsage(char const* operation, CUcontext ctx)
263+
void logMemoryUsage(char const* operation, CUcontext ctx)
264264
{
265265
auto const mem = getMemoryInfo();
266266
TLLM_LOG_DEBUG("%s: Context=%p, Free Memory=%zu MB (%.1f%%), Total=%zu MB", operation, ctx, mem.free_mb,
267267
mem.free_percent, mem.total_mb);
268268
}
269269

270270
// Helper function to throw
271-
inline void throwCublasErrorWithMemInfo(char const* operation, CUcontext ctx, cublasStatus_t status)
271+
void throwCublasErrorWithMemInfo(char const* operation, CUcontext ctx, cublasStatus_t status)
272272
{
273273
auto const mem = getMemoryInfo();
274274
TLLM_THROW(

0 commit comments

Comments
 (0)