Skip to content

Commit 6027426

Browse files
ascend-direct-devyouxiao
andauthored
add remove buffer pool (#941)
Co-authored-by: youxiao <youxiao@huawei.com>
1 parent 4d01530 commit 6027426

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mooncake-transfer-engine/src/transport/ascend_transport/ascend_direct_transport/ascend_direct_transport.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,15 @@ int AscendDirectTransport::InitAdxlEngine() {
154154
}
155155
// set default buffer pool
156156
options["adxl.BufferPool"] = "4:8";
157+
use_buffer_pool_ = true;
157158
char *buffer_pool = std::getenv("ASCEND_BUFFER_POOL");
158159
if (buffer_pool) {
159160
options["adxl.BufferPool"] = buffer_pool;
160161
LOG(INFO) << "Set adxl.BufferPool to:" << buffer_pool;
161-
use_buffer_pool_ = true;
162+
if (std::strcmp(buffer_pool, "0:0") == 0) {
163+
LOG(INFO) << "Cancel buffer pool.";
164+
use_buffer_pool_ = false;
165+
}
162166
}
163167
auto adxl_engine_name =
164168
adxl::AscendString((host_ip + ":" + std::to_string(host_port)).c_str());

0 commit comments

Comments
 (0)