Commit ae781c54 authored by yangql's avatar yangql
Browse files

增加对dtk24.04.1的支持,以及对k100_AI的支持。

parent 5a3df022
...@@ -13,6 +13,7 @@ set(CMAKE_BUILD_TYPE release) ...@@ -13,6 +13,7 @@ set(CMAKE_BUILD_TYPE release)
set(INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Src/ set(INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Src/
${CMAKE_CURRENT_SOURCE_DIR}/Src/Utility/ ${CMAKE_CURRENT_SOURCE_DIR}/Src/Utility/
$ENV{DTKROOT}/include/ $ENV{DTKROOT}/include/
$ENV{DTKROOT}/onnxruntime/include/
${CMAKE_CURRENT_SOURCE_DIR}/depend/include/) ${CMAKE_CURRENT_SOURCE_DIR}/depend/include/)
include_directories(${INCLUDE_PATH}) include_directories(${INCLUDE_PATH})
......
...@@ -23,13 +23,13 @@ Segment Embedding:表明这个词属于哪个句子(NSP需要两个句子) ...@@ -23,13 +23,13 @@ Segment Embedding:表明这个词属于哪个句子(NSP需要两个句子)
拉取镜像: 拉取镜像:
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0.0-dtk22.10.1 docker pull image.sourcefind.cn:5000/dcu/admin/base/migraphx:4.3.0-ubuntu20.04-dtk24.04.1-py3.10
``` ```
创建并启动容器,安装相关依赖: 创建并启动容器,安装相关依赖:
``` ```
docker run --shm-size 16g --network=host --name=bert_ort --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/bert_onnxruntime:/home/bert_onnxruntime -it <Your Image ID> /bin/bash docker run --shm-size 16g --network=host --name=bert_onnxruntime -v /opt/hyhal:/opt/hyhal:ro --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/bert_onnxruntime:/home/bert_onnxruntime -it <Your Image ID> /bin/bash
# 激活dtk # 激活dtk
source /opt/dtk/env.sh source /opt/dtk/env.sh
......
#include <Bert.h> #include <Bert.h>
#include <onnxruntime/core/session/onnxruntime_cxx_api.h>
#include <Filesystem.h> #include <Filesystem.h>
#include <SimpleLog.h> #include <SimpleLog.h>
#include <algorithm> #include <algorithm>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include <onnxruntime/core/session/onnxruntime_cxx_api.h> #include <onnxruntime_cxx_api.h>
#include <tokenization.h> #include <tokenization.h>
namespace ortSamples namespace ortSamples
...@@ -71,4 +71,4 @@ private: ...@@ -71,4 +71,4 @@ private:
} }
#endif #endif
\ No newline at end of file
...@@ -679,9 +679,9 @@ static std::vector<std::string> SplitString(std::string str, std::string separat ...@@ -679,9 +679,9 @@ static std::vector<std::string> SplitString(std::string str, std::string separat
// process // process
double process = (1.0*(i + 1) / fileNameList.size()) * 100; double process = (1.0*(i + 1) / fileNameList.size()) * 100;
printf("%s done! %f% \n", GetFileName(fileNameList[i]).c_str(), process); printf("%s done! %f \n", GetFileName(fileNameList[i]).c_str(), process);
} }
printf("all done!(the number of files:%d)\n", fileNameList.size()); printf("all done!(the number of files:%zu)\n", fileNameList.size());
return true; return true;
......
...@@ -141,7 +141,7 @@ inline LogTime GetTime() ...@@ -141,7 +141,7 @@ inline LogTime GetTime()
SYSTEMTIME systemTime; SYSTEMTIME systemTime;
GetLocalTime(&systemTime); GetLocalTime(&systemTime);
char temp[8] = { 0 }; char temp[12] = { 0 };
sprintf(temp, "%04d", systemTime.wYear); sprintf(temp, "%04d", systemTime.wYear);
currentTime.year=string(temp); currentTime.year=string(temp);
sprintf(temp, "%02d", systemTime.wMonth); sprintf(temp, "%02d", systemTime.wMonth);
......
FROM image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0.0-dtk22.10.1 FROM image.sourcefind.cn:5000/dcu/admin/base/migraphx:4.3.0-ubuntu20.04-dtk24.04.1-py3.10
RUN source /opt/dtk/env.sh RUN source /opt/dtk/env.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment