Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Nickolay V. Shmyrev
2023-10-07 15:24:57 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-10-07 20:24:57 +0800
Commit
c12286fe5e90ac0e234c0f8b0846ed926ff03506
c12286fe
1 parent
36017d49
Proper convolution mode for fast GPU processing (#350)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
sherpa-onnx/csrc/session.cc
sherpa-onnx/csrc/session.cc
查看文件 @
c12286f
...
...
@@ -25,6 +25,11 @@ static Ort::SessionOptions GetSessionOptionsImpl(int32_t num_threads,
sess_opts
.
SetIntraOpNumThreads
(
num_threads
);
sess_opts
.
SetInterOpNumThreads
(
num_threads
);
// Other possible options
// sess_opts.SetGraphOptimizationLevel(ORT_ENABLE_EXTENDED);
// sess_opts.SetLogSeverityLevel(ORT_LOGGING_LEVEL_VERBOSE);
// sess_opts.EnableProfiling("profile");
switch
(
p
)
{
case
Provider
:
:
kCPU
:
break
;
// nothing to do for the CPU provider
...
...
@@ -36,6 +41,8 @@ static Ort::SessionOptions GetSessionOptionsImpl(int32_t num_threads,
// The CUDA provider is available, proceed with setting the options
OrtCUDAProviderOptions
options
;
options
.
device_id
=
0
;
// Default OrtCudnnConvAlgoSearchExhaustive is extremely slow
options
.
cudnn_conv_algo_search
=
OrtCudnnConvAlgoSearchHeuristic
;
// set more options on need
sess_opts
.
AppendExecutionProvider_CUDA
(
options
);
}
else
{
...
...
请
注册
或
登录
后发表评论