Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lvhan028 committed Sep 24, 2024
1 parent 900cf4a commit 9cb9be5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lmdeploy/turbomind/turbomind.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down
4 changes: 0 additions & 4 deletions src/turbomind/utils/cuda_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ template<typename T>
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");
}
Expand All @@ -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");
}
Expand All @@ -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");
}
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 9cb9be5

Please sign in to comment.