Skip to content

Commit 0e005de

Browse files
authored
print tid in vODLA adapter (#876)
* Update version to 0.7.32 * Print tid in vODLA Adapter execution.
1 parent 827f7c1 commit 0e005de

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
cmake_minimum_required(VERSION 3.14.5)
1818

1919
set(PROJECT_NAME "HALO_STABLE_SDK_2.3.1" HOMEPAGE_URL "https://github.com/alibaba/heterogeneity-aware-lowering-and-optimization")
20-
set(PROJECT_VERSION "0.7.31")
20+
set(PROJECT_VERSION "0.7.32")
2121

2222
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES C CXX ASM)
2323

ODLA/platforms/vodla/vODLA.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <ODLA/odla.h>
22
#include <stdlib.h>
33
#include <string.h>
4+
#include <sys/syscall.h>
45
#include <sys/time.h>
6+
#include <unistd.h>
57
#include <vodh_common.h>
68

79
#include <cassert>
@@ -12,6 +14,7 @@
1214
#include <memory>
1315
#include <vector>
1416

17+
#define gettid() syscall(SYS_gettid)
1518
#define MAX_INPUT_TENSOR 256
1619
#define MAX_OUTPUT_TENSOR 256
1720

@@ -850,6 +853,7 @@ bool allocDMA(odla_device device, odla_context context) {
850853
odla_status odla_ExecuteComputation(odla_computation comp, odla_context context,
851854
odla_compute_mode mode,
852855
odla_device device) {
856+
pid_t tid = gettid();
853857
// init vODLA device failed
854858
if (context == NULL) {
855859
std::cout << "[vODLA] ERROR: odla device is NULL.\n";
@@ -934,9 +938,8 @@ odla_status odla_ExecuteComputation(odla_computation comp, odla_context context,
934938
device->vodh_infer_opt.model.use_file = 1; // use file path instead of DMA
935939
strcpy(device->vodh_infer_opt.model.weight_file, comp->wtFile.c_str());
936940

937-
#ifdef DEBUG
938-
std::cout << "[vODLA] INFO: start remote inference...\n";
939-
#endif
941+
std::cout << "[vODLA] INFO: thread " << tid
942+
<< " start remote inference...\n";
940943

941944
#ifdef TIMING
942945
std::cout << "[vODLA] INFO: loop " << LOOP_CNT << " times.\n";

tests/driver/test_driver.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919

2020
// RUN: %halo_compiler -version 2>&1 | FileCheck %s
2121

22-
// CHECK: Version: 0.7.31
22+
// CHECK: Version: 0.7.32
2323
// CHECK: HALO Repo:{{.*}} Rev:

0 commit comments

Comments
 (0)