Skip to content

Commit c34d9b0

Browse files
authored
[ROCM] remove more rocm ep code (#26712)
### Description Remove USE_ROCM and rocm ep related code. Public APIs (C/C++ APIs and corresponding C# native methods) are not touched. ### Motivation and Context Follow up on #25181 and #26697
1 parent 3e8be0e commit c34d9b0

File tree

254 files changed

+442
-7646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+442
-7646
lines changed

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ep:oneDNN: '/\bone\s*dnn\b/i'
1111
ep:OpenVINO: '/\bopen\s*vino\b/i'
1212
ep:QNN: '/\bqnn\b/i'
1313
ep:RockchipNPU: '/\brockchip(?:npu)?\b/i'
14-
ep:ROCm: '/\brocm\b/i'
1514
ep:SNPE: '/\bsnpe\b/i'
1615
ep:tvm: '/\btvm\b/i'
1716
ep:VitisAI: '/\bvitis(?:ai)?\b/i'

ThirdPartyNotices.txt

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5806,41 +5806,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58065806

58075807
_____
58085808

5809-
composable_kernel
5810-
5811-
https://github.com/ROCmSoftwarePlatform/composable_kernel
5812-
5813-
Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang)
5814-
Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang)
5815-
Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan)
5816-
Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang)
5817-
Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah)
5818-
Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou)
5819-
Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan)
5820-
5821-
SPDX-License-Identifier: MIT
5822-
Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
5823-
5824-
Permission is hereby granted, free of charge, to any person obtaining a copy
5825-
of this software and associated documentation files (the "Software"), to deal
5826-
in the Software without restriction, including without limitation the rights
5827-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5828-
copies of the Software, and to permit persons to whom the Software is
5829-
furnished to do so, subject to the following conditions:
5830-
5831-
The above copyright notice and this permission notice shall be included in all
5832-
copies or substantial portions of the Software.
5833-
5834-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5835-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5836-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5837-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5838-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5839-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5840-
SOFTWARE.
5841-
5842-
_____
5843-
58445809
neural-speed
58455810

58465811
https://github.com/intel/neural-speed

cmake/external/composable_kernel.cmake

Lines changed: 0 additions & 66 deletions
This file was deleted.

cmake/onnxruntime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function(get_c_cxx_api_headers HEADERS_VAR)
4242
foreach(f ${ONNXRUNTIME_PROVIDER_NAMES})
4343
# The header files in include/onnxruntime/core/providers/cuda directory cannot be flattened to the same directory
4444
# with onnxruntime_c_api.h . Most other EPs probably also do not work in this way.
45-
if((NOT f STREQUAL cuda) AND (NOT f STREQUAL rocm))
45+
if(NOT f STREQUAL cuda)
4646
file(GLOB _provider_headers CONFIGURE_DEPENDS
4747
"${REPO_ROOT}/include/onnxruntime/core/providers/${f}/*.h"
4848
)

cmake/onnxruntime_python.cmake

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ endif()
104104
if(onnxruntime_USE_CANN)
105105
target_include_directories(onnxruntime_pybind11_state PRIVATE ${onnxruntime_CANN_HOME}/include)
106106
endif()
107-
if(onnxruntime_USE_ROCM)
108-
target_compile_options(onnxruntime_pybind11_state PUBLIC -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1)
109-
target_include_directories(onnxruntime_pybind11_state PRIVATE ${onnxruntime_ROCM_HOME}/hipfft/include ${onnxruntime_ROCM_HOME}/include ${onnxruntime_ROCM_HOME}/hiprand/include ${onnxruntime_ROCM_HOME}/rocrand/include ${CMAKE_CURRENT_BINARY_DIR}/amdgpu/onnxruntime ${CMAKE_CURRENT_BINARY_DIR}/amdgpu/orttraining)
110-
endif()
111107
if (onnxruntime_USE_NCCL)
112108
target_include_directories(onnxruntime_pybind11_state PRIVATE ${NCCL_INCLUDE_DIRS})
113109
endif()
@@ -774,7 +770,6 @@ endif()
774770
if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD
775771
AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS|visionOS|tvOS"
776772
AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android"
777-
AND NOT onnxruntime_USE_ROCM
778773
AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
779774
add_custom_command(
780775
TARGET onnxruntime_pybind11_state POST_BUILD
@@ -1044,16 +1039,6 @@ if (onnxruntime_USE_CANN)
10441039
)
10451040
endif()
10461041

1047-
if (onnxruntime_USE_ROCM)
1048-
add_custom_command(
1049-
TARGET onnxruntime_pybind11_state POST_BUILD
1050-
COMMAND ${CMAKE_COMMAND} -E copy
1051-
$<TARGET_FILE:onnxruntime_providers_rocm>
1052-
$<TARGET_FILE:onnxruntime_providers_shared>
1053-
$<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/capi/
1054-
)
1055-
endif()
1056-
10571042
if (onnxruntime_USE_DML)
10581043
if (NOT onnxruntime_USE_CUSTOM_DIRECTML)
10591044
set(dml_shared_lib_path ${DML_PACKAGE_DIR}/bin/${onnxruntime_target_platform}-win/${DML_SHARED_LIB})

cmake/onnxruntime_session.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,3 @@ if (NOT onnxruntime_BUILD_SHARED_LIB)
7373
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR})
7474
endif()
7575

76-
if (onnxruntime_USE_NCCL AND onnxruntime_USE_ROCM)
77-
add_dependencies(onnxruntime_session generate_hipified_files)
78-
endif()

cmake/onnxruntime_unittests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ if(onnxruntime_USE_ARMNN)
677677
endif()
678678

679679
set(ONNXRUNTIME_TEST_STATIC_PROVIDER_LIBS
680-
# CUDA, ROCM, TENSORRT, MIGRAPHX, DNNL, and OpenVINO are dynamically loaded at runtime.
680+
# CUDA, TENSORRT, MIGRAPHX, DNNL, and OpenVINO are dynamically loaded at runtime.
681681
# QNN EP can be built as either a dynamic and static libs.
682682
${PROVIDERS_NNAPI}
683683
${PROVIDERS_VSINPU}

0 commit comments

Comments
 (0)