From 9cb9be5823247fca16fcca58cbffb20b65ced27a Mon Sep 17 00:00:00 2001 From: lvhan028 Date: Tue, 24 Sep 2024 21:11:45 +0800 Subject: [PATCH] update --- lmdeploy/turbomind/turbomind.py | 4 ++-- src/turbomind/utils/cuda_utils.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lmdeploy/turbomind/turbomind.py b/lmdeploy/turbomind/turbomind.py index d768fc313..00b419ded 100644 --- a/lmdeploy/turbomind/turbomind.py +++ b/lmdeploy/turbomind/turbomind.py @@ -361,7 +361,7 @@ def _func(): try: output = self.model_inst.forward(inputs, instance_comm) except Exception as e: - logger.error(f'Exception happened: {e}') + logger.error(f'unhandled exception: {e}') self.que.put((-1, None)) return self.que.put((True, output)) @@ -380,7 +380,7 @@ def _func(): try: output = self.model_inst.forward(inputs, instance_comm) except Exception as e: - logger.error(f'Exception happened: {e}') + logger.error(f'unhandled exception: {e}') que.put((-1, None)) return que.put((True, output)) diff --git a/src/turbomind/utils/cuda_utils.h b/src/turbomind/utils/cuda_utils.h index 0335b5b24..2148fcc16 100644 --- a/src/turbomind/utils/cuda_utils.h +++ b/src/turbomind/utils/cuda_utils.h @@ -120,7 +120,6 @@ template void check(T result, char const* const func, const char* const file, int const line) { if (result) { - TM_LOG_ERROR("[TM][ERROR] CUDA runtime error: %s, %s:%d", _cudaGetErrorEnum(result), file, line); throw std::runtime_error(std::string("[TM][ERROR] CUDA runtime error: ") + (_cudaGetErrorEnum(result)) + " " + file + ":" + std::to_string(line) + " \n"); } @@ -139,7 +138,6 @@ inline void syncAndCheck(const char* const file, int const line) cudaDeviceSynchronize(); cudaError_t result = cudaGetLastError(); if (result) { - TM_LOG_ERROR("[TM][ERROR] CUDA runtime error: %s, %s:%d", _cudaGetErrorEnum(result), file, line); throw std::runtime_error(std::string("[TM][ERROR] CUDA runtime error: ") + (_cudaGetErrorEnum(result)) + " " + file + ":" + std::to_string(line) + " \n"); } @@ -151,7 +149,6 @@ inline void syncAndCheck(const char* const file, int const line) cudaDeviceSynchronize(); cudaError_t result = cudaGetLastError(); if (result) { - TM_LOG_ERROR("[TM][ERROR] CUDA runtime error: %s, %s:%d", _cudaGetErrorEnum(result), file, line); throw std::runtime_error(std::string("[TM][ERROR] CUDA runtime error: ") + (_cudaGetErrorEnum(result)) + " " + file + ":" + std::to_string(line) + " \n"); } @@ -203,7 +200,6 @@ void check_abs_mean_val(const T* result, const int size); [[noreturn]] inline void throwRuntimeError(const char* const file, int const line, std::string const& info = "") { - TM_LOG_ERROR("[TM][ERROR] %s Assertion fail: %s:%d", info, file, line); throw std::runtime_error(std::string("[TM][ERROR] ") + info + " Assertion fail: " + file + ":" + std::to_string(line) + " \n"); }