Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove memory copy between TensorRT and CUDA #1561

Merged
merged 23 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
35c9e96
remove memory copy between CUDA and TRT
stevenlix Aug 1, 2019
c66fbe8
add info to RegisterExecutionProvider input
stevenlix Aug 1, 2019
bb6e268
use new IDeviceAllocator for trt allocator
stevenlix Aug 1, 2019
3cad0ba
remove SetDefaultInputsMemoryType from TRT EP
stevenlix Aug 1, 2019
a5d1893
Merge branch 'master' into stevenlix/trtoverhead
stevenlix Aug 1, 2019
231cf0b
remove onnx-tensorrt 5.0
stevenlix Aug 1, 2019
a7f534e
add submodule onnx-tensorrt branch 5.1
stevenlix Aug 2, 2019
4d7812f
remove redundancy
stevenlix Aug 5, 2019
7aab699
Update transformer_memcpy.cc
stevenlix Aug 5, 2019
7f306ff
Update tensorrt_execution_provider.cc
stevenlix Aug 5, 2019
5cc3e1c
switch to TensorRT 5.1.5.0
stevenlix Aug 5, 2019
7cbd863
Merge branch 'stevenlix/trtoverhead' of https://github.com/Microsoft/…
stevenlix Aug 5, 2019
196386a
update python binding
stevenlix Aug 6, 2019
5c2d5e5
disable failed test case on TensorRT
stevenlix Aug 6, 2019
bd604e9
Merge branch 'master' into stevenlix/trtoverhead
stevenlix Aug 6, 2019
96c7560
Update activation_op_test.cc
stevenlix Aug 6, 2019
62ec7cc
upgrade to TensorRT container 19.06
stevenlix Aug 6, 2019
40240d0
Merge branch 'stevenlix/trtoverhead' of https://github.com/Microsoft/…
stevenlix Aug 6, 2019
3bee98d
update according to feedback
stevenlix Aug 8, 2019
94923d7
add comments
stevenlix Aug 8, 2019
5d720b0
remove tensorrt allocator and use cuda(gpu) allocator
stevenlix Aug 8, 2019
b9cb8f1
update onnx-tensorrt submodule
stevenlix Aug 8, 2019
f153d91
change ci build cuda directory name
stevenlix Aug 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
change ci build cuda directory name
  • Loading branch information
stevenlix committed Aug 8, 2019
commit f153d915bc08a9a8439fc582756a099dd9e3998f
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
displayName: 'Run build script'
inputs:
filename: 'build.bat'
arguments: ' --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10_copy"
arguments: ' --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll"
--cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --build_dir $(buildDirectory) --config Release --use_openmp --build_wheel'
workingFolder: "$(Build.SourcesDirectory)"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
displayName: 'Build and Test OnnxRuntime'
inputs:
script: |
$(Build.BinariesDirectory)\packages\python\python.exe $(Build.SourcesDirectory)\tools\ci_build\build.py --config $(buildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_onnx_tests --use_openmp --msvc_toolset=14.11 --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10_copy" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda"
$(Build.BinariesDirectory)\packages\python\python.exe $(Build.SourcesDirectory)\tools\ci_build\build.py --config $(buildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_onnx_tests --use_openmp --msvc_toolset=14.11 --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda"
workingDirectory: '$(Build.BinariesDirectory)'

- template: templates/c-api-artifacts-package-and-publish-steps-windows.yml
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/azure-pipelines/nuget/templates/gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
parameters:
AgentPool : $(AgentPoolWin)
JobName: 'Windows_CI_GPU_Dev'
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --build_shared_lib --build_csharp --enable_onnx_tests --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10_copy" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --msvc_toolset=14.11'
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --build_shared_lib --build_csharp --enable_onnx_tests --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --msvc_toolset=14.11'
DoDebugBuild: 'false'
DoNugetPack : 'true'
DoCompliance: 'false'
DoEsrp: ${{ parameters.DoEsrp }}
BuildArch: 'amd64'
SetVcvars: 'true'
MsbuildArguments: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_copy\'
MsbuildArguments: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_trt515dll\'
EnvSetupScript: 'setup_env_cuda.bat'
CudaVersion: '10.0'
NuPackScript: |
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/azure-pipelines/win-gpu-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ jobs:
AgentPool : 'Win-GPU-CUDA10'
DoDebugBuild: 'true'
DoCompliance: 'false'
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --use_mkldnn --build_shared_lib --build_csharp --enable_onnx_tests --use_cuda --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10_copy" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --msvc_toolset=14.11'
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --use_mkldnn --build_shared_lib --build_csharp --enable_onnx_tests --use_cuda --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --msvc_toolset=14.11'
JobName: 'Windows_CI_GPU_Dev'
DoNugetPack: 'false'
NuPackScript : ''
DoTestCoverage: 'false'
BuildArch: 'amd64'
SetVcvars: 'true'
MsbuildArguments: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_copy\'
MsbuildArguments: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_trt515dll\'
EnvSetupScript: 'setup_env_cuda.bat'
CudaVersion: '10.0'
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
displayName: 'Download test data and generate cmake config'
inputs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug Release --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_home="C:\local\cuda_10.0.130_win10_copy" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.1.5.0" --update --msvc_toolset=14.11'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug Release --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.1.5.0" --update --msvc_toolset=14.11'
workingDirectory: "$(Build.BinariesDirectory)"

- task: VSBuild@1
Expand All @@ -37,15 +37,15 @@ jobs:
solution: '$(Build.BinariesDirectory)\Debug\onnxruntime.sln'
platform: 'x64'
configuration: 'Debug'
msbuildArgs: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_copy\'
msbuildArgs: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_trt515dll\'
msbuildArchitecture: 'x64'
logProjectEvents: true
workingFolder: '$(Build.BinariesDirectory)\Debug'
- task: BatchScript@1
displayName: 'Test Debug'
inputs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10_copy" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.1.5.0" --test'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.1.5.0" --test'
workingFolder: '$(Build.BinariesDirectory)'
- task: VSBuild@1
displayName: 'Build C# Debug'
Expand All @@ -72,7 +72,7 @@ jobs:
solution: '$(Build.BinariesDirectory)\Release\onnxruntime.sln'
platform: 'x64'
configuration: 'Release'
msbuildArgs: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_copy\'
msbuildArgs: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10_trt515dll\'
msbuildArchitecture: 'x64'
logProjectEvents: true
workingFolder: '$(Build.BinariesDirectory)\Release'
Expand All @@ -81,7 +81,7 @@ jobs:
displayName: 'Test Release'
inputs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10_copy" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.1.5.0" --test'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10_trt515dll" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.1.5.0" --test'
workingFolder: "$(Build.BinariesDirectory)"

- task: VSBuild@1
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_build/github/windows/setup_env_cuda.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
set PATH=%BUILD_BINARIESDIRECTORY%\packages\python;%BUILD_BINARIESDIRECTORY%\packages\python\DLLs;%BUILD_BINARIESDIRECTORY%\packages\python\Library\bin;%BUILD_BINARIESDIRECTORY%\packages\python\script;C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda\bin;C:\local\cuda_10.0.130_win10_copy\bin;%PATH%
set PATH=%BUILD_BINARIESDIRECTORY%\packages\python;%BUILD_BINARIESDIRECTORY%\packages\python\DLLs;%BUILD_BINARIESDIRECTORY%\packages\python\Library\bin;%BUILD_BINARIESDIRECTORY%\packages\python\script;C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda\bin;C:\local\cuda_10.0.130_win10_trt515dll\bin;%PATH%