diff --git a/.ci/azure/android_arm64.yml b/.ci/azure/android_arm64.yml index bdd6bc9eb..3d6d09ea4 100644 --- a/.ci/azure/android_arm64.yml +++ b/.ci/azure/android_arm64.yml @@ -6,7 +6,7 @@ trigger: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -16,7 +16,7 @@ pr: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: @@ -120,7 +120,7 @@ jobs: -DENABLE_SAMPLES=ON -DENABLE_INTEL_MYRIAD=OFF -DBUILD_java_api=ON - -DBUILD_cuda_plugin=OFF + -DBUILD_nvidia_plugin=OFF -DTHREADING=SEQ -DIE_EXTRA_MODULES=$(REPO_DIR)/modules $(OPENVINO_REPO_DIR) diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 244e9952d..4dbd67796 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -6,7 +6,7 @@ trigger: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -16,7 +16,7 @@ pr: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: @@ -122,7 +122,7 @@ jobs: -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DNGRAPH_ONNX_IMPORT_ENABLE=OFF - -DBUILD_cuda_plugin=OFF + -DBUILD_nvidia_plugin=OFF -DIE_EXTRA_MODULES=$(REPO_DIR)/modules -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.8 diff --git a/.ci/azure/linux_arm64.yml b/.ci/azure/linux_arm64.yml index 63c677c4b..2207872f1 100644 --- a/.ci/azure/linux_arm64.yml +++ b/.ci/azure/linux_arm64.yml @@ -6,7 +6,7 @@ trigger: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -16,7 +16,7 @@ pr: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: @@ -153,7 +153,7 @@ jobs: -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_SAMPLES=ON -DBUILD_java_api=OFF - -DBUILD_cuda_plugin=OFF + -DBUILD_nvidia_plugin=OFF -DENABLE_INTEL_MYRIAD=OFF -DTHREADING=SEQ -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules diff --git a/.ci/azure/linux_coverity_arm64.yml b/.ci/azure/linux_coverity_arm64.yml index 41e14c1ca..891227a9a 100644 --- a/.ci/azure/linux_coverity_arm64.yml +++ b/.ci/azure/linux_coverity_arm64.yml @@ -6,7 +6,7 @@ trigger: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -16,7 +16,7 @@ pr: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: diff --git a/.ci/azure/linux_cuda.yml b/.ci/azure/linux_cuda.yml index ca276258c..65abd602f 100644 --- a/.ci/azure/linux_cuda.yml +++ b/.ci/azure/linux_cuda.yml @@ -5,7 +5,7 @@ trigger: - releases/* paths: include: - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -14,7 +14,7 @@ pr: - releases/* paths: include: - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: diff --git a/.ci/azure/mac.yml b/.ci/azure/mac.yml index 2ec1645ff..131c8f831 100644 --- a/.ci/azure/mac.yml +++ b/.ci/azure/mac.yml @@ -6,7 +6,7 @@ trigger: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -16,7 +16,7 @@ pr: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: @@ -104,7 +104,7 @@ jobs: # Disable errors with Ninja export CXXFLAGS="-Wno-error=unused-command-line-argument" export CFLAGS="-Wno-error=unused-command-line-argument" - cmake -GNinja -DVERBOSE_BUILD=ON -DNGRAPH_ONNX_IMPORT_ENABLE=OFF -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DBUILD_cuda_plugin=OFF -DIE_EXTRA_MODULES=$(REPO_DIR)/modules $(OPENVINO_REPO_DIR) + cmake -GNinja -DVERBOSE_BUILD=ON -DNGRAPH_ONNX_IMPORT_ENABLE=OFF -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DBUILD_nvidia_plugin=OFF -DIE_EXTRA_MODULES=$(REPO_DIR)/modules $(OPENVINO_REPO_DIR) workingDirectory: $(BUILD_DIR) displayName: 'CMake' diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 1e292f857..1d99742b4 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -6,7 +6,7 @@ trigger: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin pr: branches: @@ -16,7 +16,7 @@ pr: paths: exclude: - modules/optimum - - modules/cuda_plugin + - modules/nvidia_plugin resources: repositories: @@ -103,7 +103,7 @@ jobs: - script: | set PATH=$(WORK_DIR)\ninja-win;%PATH% - call "$(MSVS_VARS_PATH)" && cmake -GNinja -DNGRAPH_ONNX_IMPORT_ENABLE=OFF -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DBUILD_cuda_plugin=OFF -DIE_EXTRA_MODULES=$(REPO_DIR)/modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(OPENVINO_REPO_DIR) + call "$(MSVS_VARS_PATH)" && cmake -GNinja -DNGRAPH_ONNX_IMPORT_ENABLE=OFF -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DBUILD_nvidia_plugin=OFF -DIE_EXTRA_MODULES=$(REPO_DIR)/modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(OPENVINO_REPO_DIR) workingDirectory: $(BUILD_DIR) displayName: 'CMake' diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index ca8ace150..1b5556301 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -3,11 +3,11 @@ on: push: paths: - '**' - - '!modules/cuda_plugin/**' + - '!modules/nvidia_plugin/**' pull_request: paths: - '**' - - '!modules/cuda_plugin/**' + - '!modules/nvidia_plugin/**' jobs: Java: diff --git a/.github/workflows/history_cuda.yml b/.github/workflows/history_cuda.yml index c65cc18be..8e5a5d07d 100644 --- a/.github/workflows/history_cuda.yml +++ b/.github/workflows/history_cuda.yml @@ -2,16 +2,18 @@ name: History CUDA on: push: paths: - - 'modules/cuda_plugin/**.*' + - 'modules/nvidia_plugin/**.*' pull_request: paths: - - 'modules/cuda_plugin/**.*' + - 'modules/nvidia_plugin/**.*' jobs: history: runs-on: lohika-ci steps: - name: checkout master branch run: git -C ~/runner/openvino_contrib checkout master + - name: fetch master branch + run: git -C ~/runner/openvino_contrib pull origin master - name: delete temporary branch run: git -C ~/runner/openvino_contrib branch -D temporary-ci-branch | echo 1 - name: fetch diff --git a/.github/workflows/sanitizer_cuda.yml b/.github/workflows/sanitizer_cuda.yml index 9ea7393d5..1c2d0b400 100644 --- a/.github/workflows/sanitizer_cuda.yml +++ b/.github/workflows/sanitizer_cuda.yml @@ -4,7 +4,10 @@ on: branches: - master paths: - - 'modules/cuda_plugin/**.*' + - 'modules/nvidia_plugin/**.*' + pull_request: + paths: + - 'modules/nvidia_plugin/**.*' workflow_dispatch: jobs: @@ -18,6 +21,8 @@ jobs: run: git -C ~/runner/openvino submodule update --init --recursive - name: checkout openvino_contrib master branch run: git -C ~/runner/openvino_contrib checkout master + - name: fetch openvino_contrib master branch + run: git -C ~/runner/openvino_contrib pull origin master - name: delete openvino_contrib temporary branch run: git -C ~/runner/openvino_contrib branch -D temporary-ci-branch | echo 1 - name: fetch openvino_contrib @@ -29,4 +34,4 @@ jobs: - name: ninja run: echo 'all:; +NINJA_STATUS="[%u/%r/%f] " ninja -C ~/runner/build_cuda_sanitizer -v CudaFuncTests CudaUnitTests' | make -j`nproc` -f- - name: functional tests - run: env -C ~/runner PATH=/usr/local/cuda-11.2/bin:/usr/local/cuda-11.4/bin:/usr/local/cuda-11.7/bin:$PATH ./openvino_contrib/modules/cuda_plugin/utils/cuda-sanitizer.sh ./build_cuda_sanitizer/bin/intel64/CudaFuncTests --gtest_filter=*smoke*:-*dynamic*:*Dynamic*:smoke_GRU*:smoke_LSTM*:smoke_TensorIterator*:*ConvBiasFusion*:*smoke*OVExecGraphImportExportTest.importExportedIENetwork*:*smoke*OVClassBasicTestP.registerNewPluginNoThrows*:*smoke*OVHoldersTest.Orders*:*smoke*IEClassBasicTestP.registerNewPluginNoThrows*:*smoke*IEClassBasicTestP.smoke_registerPluginsXMLUnicodePath* + run: env -C ~/runner PATH=/usr/local/cuda-11.2/bin:/usr/local/cuda-11.4/bin:/usr/local/cuda-11.7/bin:$PATH ./openvino_contrib/modules/nvidia_plugin/utils/cuda-sanitizer.sh ./build_cuda_sanitizer/bin/intel64/CudaFuncTests --gtest_filter=*smoke*:-*dynamic*:*Dynamic*:smoke_GRU*:smoke_LSTM*:smoke_TensorIterator*:*ConvBiasFusion*:*smoke*OVExecGraphImportExportTest.importExportedIENetwork*:*smoke*OVClassBasicTestP.registerNewPluginNoThrows*:*smoke*OVHoldersTest.Orders*:*smoke*IEClassBasicTestP.registerNewPluginNoThrows*:*smoke*IEClassBasicTestP.smoke_registerPluginsXMLUnicodePath* diff --git a/.github/workflows/test_cuda.yml b/.github/workflows/test_cuda.yml index 30f246487..01eb4a21a 100644 --- a/.github/workflows/test_cuda.yml +++ b/.github/workflows/test_cuda.yml @@ -2,10 +2,10 @@ name: Test CUDA on: push: paths: - - 'modules/cuda_plugin/**.*' + - 'modules/nvidia_plugin/**.*' pull_request: paths: - - 'modules/cuda_plugin/**.*' + - 'modules/nvidia_plugin/**.*' jobs: build: runs-on: lohika-ci @@ -16,6 +16,8 @@ jobs: run: git -C ~/runner/openvino submodule update --init --recursive - name: checkout openvino_contrib master branch run: git -C ~/runner/openvino_contrib checkout master + - name: fetch openvino_contrib master branch + run: git -C ~/runner/openvino_contrib pull origin master - name: delete openvino_contrib temporary branch run: git -C ~/runner/openvino_contrib branch -D temporary-ci-branch | echo 1 - name: fetch openvino_contrib @@ -23,7 +25,7 @@ jobs: - name: checkout openvino_contrib run: git -C ~/runner/openvino_contrib checkout temporary-ci-branch - name: format openvino_contrib - run: cd ~/runner/openvino_contrib && ./modules/cuda_plugin/utils/check.sh + run: cd ~/runner/openvino_contrib && ./modules/nvidia_plugin/utils/check.sh - name: cmake run: env -C ~/runner ./configrelease.sh - name: ninja diff --git a/README.md b/README.md index ac7b5206f..a48d8f37b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ So, all the new modules should be developed separately, and published in the `op This list gives an overview of all modules available inside the contrib repository. * [**arm_plugin**](./modules/arm_plugin): ARM CPU Plugin -- allows to perform deep neural networks inference on ARM CPUs, using OpenVINO API. -* [**cuda_plugin**](./modules/cuda_plugin): CUDA GPU Plugin -- allows to perform deep neural networks inference on NVIDIA GPUs using CUDA, using OpenVINO API. +* [**nvidia_plugin**](./modules/nvidia_plugin): NVIDIA GPU Plugin -- allows to perform deep neural networks inference on NVIDIA GPUs using CUDA, using OpenVINO API. * [**java_api**](./modules/java_api): Inference Engine Java API -- provides Java wrappers for Inference Engine public API. * [**mo_pytorch**](./modules/mo_pytorch): PyTorch extensions for Model Optimizer -- native PyTorch to OpenVINO IR converter * [**optimum**](./modules/optimum): Optimum OpenVINO -- Python extension for Hugging Face [Transformers](https://github.com/huggingface/transformers) including runtime and NNCF quantization. @@ -35,7 +35,7 @@ $ cmake -DIE_EXTRA_MODULES=/modules -DBUILD_java_api=OFF -DCMAKE_BUILD_TYPE=Release .. - cmake --build . --target CUDAPlugin -j `nproc` + cmake --build . --target nvidia_gpu -j `nproc` ``` ### Build with _setup.py_ @@ -102,7 +102,7 @@ git clone --recurse-submodules --single-branch --branch=master https://github.co ``` 2. Go to plugin directory: ```bash -cd openvino_contrib/modules/cuda_plugin +cd openvino_contrib/modules/nvidia_plugin git checkout develop ``` 3. Setup `CUDACXX` environment variable to point to the CUDA _nvcc_ compiler like the next (use yours path) @@ -117,12 +117,12 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.2/bin/nvcc 5. Run setup.py build command as follows. ```bash -export CUDA_PLUGIN_SRC_ROOT_DIR=/modules/cuda_plugin +export CUDA_PLUGIN_SRC_ROOT_DIR=/modules/nvidia_plugin python3 ${CUDA_PLUGIN_SRC_ROOT_DIR}/wheel/setup.py build ``` This will automatically download, build OpenVINO and build CUDA Plugin finally. The location of the resulting library file will be like the next. ``` -${CUDA_PLUGIN_SRC_ROOT_DIR}/build/temp.linux-x86_64-3.6/deps/openvino/bin/intel64/Debug/lib/libCUDAPlugin.so +${CUDA_PLUGIN_SRC_ROOT_DIR}/build/temp.linux-x86_64-3.6/deps/openvino/bin/intel64/Debug/lib/libopenvino_nvidia_gpu_plugin.so ``` ## Install as python package with `setup.py` @@ -131,9 +131,9 @@ To install CUDA Plugin as python package do all steps except last one from the ` After that installation could be done by running setup.py install command as follows. ```bash export OPENVINO_CONTRIB= -python3 ${OPENVINO_CONTRIB}/modules/cuda_plugin/wheel/setup.py install +python3 ${OPENVINO_CONTRIB}/modules/nvidia_plugin/wheel/setup.py install ``` -This command will install dependent openvino package if needed and update it for using with CUDA plugin. +This command will install dependent openvino package if needed and update it for using with NVIDIA GPU plugin. ## Docker support @@ -151,14 +151,14 @@ su $USER # Relogin for current user CUDA_PACKAGES_PATH= ./docker.sh build ``` -### Build CUDAPlugin in docker container -In order to build CUDAPlugin in docker, follow the steps: +### Build openvino_nvidia_gpu_plugin in docker container +In order to build openvino_nvidia_gpu_plugin in docker, follow the steps: 1. Enter the docker container: ```bash docker run --gpus all -it openvino/cudaplugin-2022.1 bin/bash ``` -2. Build the OpenVINO and CUDAPlugin according the steps described in [## How to build](#how-to-build), +2. Build the OpenVINO and openvino_nvidia_gpu_plugin according the steps described in [## How to build](#how-to-build), except 3), 4), 5) steps (this packages already installed in image) 3. Commit all your changes in container: ```bash @@ -173,7 +173,7 @@ Parameter name | Parameter values | Default | Description `CUDA_THROUGHPUT_STREAMS` | `CUDA_THROUGHPUT_AUTO`, or non negative integer values | 1 | Specifies number of CPU "execution" streams for the throughput mode. Upper bound for the number of inference requests that can be executed simultaneously. `CUDA_OPERATION_BENCHMARK` | `CUDA_YES`, `CUDA_NO` | `CUDA_NO` | Specifies if operation level benchmark should be run for increasing performance of network -During compilation of the CUDAPlugin, user could specify two options: +During compilation of the openvino_nvidia_gpu_plugin, user could specify two options: 1) `-DCUDA_KERNEL_PRINT_LOG=ON` enables print logs from kernels (WARNING, be careful with this options, could print to many logs) 2) `-DENABLE_CUDNN_BACKEND_API` enables cuDNN backend support that could increase performance of convolutions by 20% @@ -207,7 +207,7 @@ The plugin supports IRv10 and higher. The list of supported layers and its limit * NC - Supported ## License -OpenVINO™ CUDA plugin is licensed under [Apache License Version 2.0](LICENSE). +OpenVINO™ NVIDIA GPU plugin is licensed under [Apache License Version 2.0](LICENSE). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms. diff --git a/modules/cuda_plugin/SECURITY.md b/modules/nvidia_plugin/SECURITY.md similarity index 100% rename from modules/cuda_plugin/SECURITY.md rename to modules/nvidia_plugin/SECURITY.md diff --git a/modules/cuda_plugin/build.sh b/modules/nvidia_plugin/build.sh similarity index 91% rename from modules/cuda_plugin/build.sh rename to modules/nvidia_plugin/build.sh index 17c58b0a5..277b1d06e 100755 --- a/modules/cuda_plugin/build.sh +++ b/modules/nvidia_plugin/build.sh @@ -9,7 +9,7 @@ fi BUILD_JOBS=${BUILD_JOBS:-$(nproc)} BUILD_TYPE=${BUILD_TYPE:-Release} -BUILD_TARGETS=${BUILD_TARGETS:-"CudaFuncTests CudaUnitTests openvino_cuda_plugin benchmark_app"} +BUILD_TARGETS=${BUILD_TARGETS:-"CudaFuncTests CudaUnitTests openvino_nvidia_gpu_plugin benchmark_app"} WHEEL_VERSION=${WHEEL_VERSION:-"2022.1.0"} ENABLE_TESTS=${ENABLE_TESTS:-"ON"} @@ -18,7 +18,7 @@ ENABLE_TESTS=${ENABLE_TESTS:-"ON"} [[ -n "${OPENVINO_BUILD_PATH}" ]] || { echo "OPENVINO_BUILD_PATH environment variable is expected"; exit 1; } [[ -d "${OPENVINO_HOME}" ]] || { echo "OPENVINO_HOME=${OPENVINO_HOME} does not exist"; exit 1; } [[ -d "${OPENVINO_CONTRIB}" ]] || { echo "OPENVINO_CONTRIB=${OPENVINO_CONTRIB} does not exist"; exit 1; } -[[ -d "${OPENVINO_CONTRIB}/modules/cuda_plugin" ]] || { echo "Path ${OPENVINO_CONTRIB}/modules/cuda_plugin does not exist"; exit 1; } +[[ -d "${OPENVINO_CONTRIB}/modules/nvidia_plugin" ]] || { echo "Path ${OPENVINO_CONTRIB}/modules/nvidia_plugin does not exist"; exit 1; } [[ "$1" == "--setup" || "$1" == "--build" || "$1" == "--rebuild" ]] || { printf "One of the following command should be provided:\n\ - --setup (allow configure cmake project)\n\ diff --git a/modules/cuda_plugin/cmake/features.cmake b/modules/nvidia_plugin/cmake/features.cmake similarity index 100% rename from modules/cuda_plugin/cmake/features.cmake rename to modules/nvidia_plugin/cmake/features.cmake diff --git a/modules/cuda_plugin/docker.sh b/modules/nvidia_plugin/docker.sh similarity index 100% rename from modules/cuda_plugin/docker.sh rename to modules/nvidia_plugin/docker.sh diff --git a/modules/cuda_plugin/docs/cuda_opset.md b/modules/nvidia_plugin/docs/cuda_opset.md similarity index 99% rename from modules/cuda_plugin/docs/cuda_opset.md rename to modules/nvidia_plugin/docs/cuda_opset.md index a862de787..91ed5b9c0 100644 --- a/modules/cuda_plugin/docs/cuda_opset.md +++ b/modules/nvidia_plugin/docs/cuda_opset.md @@ -1,13 +1,13 @@ -# CUDA plugin operation set specification +# NVIDIA GPU plugin operation set specification This specification document based on [opset6](https://github.com/openvinotoolkit/openvino/blob/master/docs/ops/opset6.md) operation set supported in OpenVINO. Examples of operation instances are expressed as IR V10 xml snippets. Such IR is generated by the Model Optimizer. The semantics match corresponding nGraph operation classes declared in `namespace opset6`. -> **NOTE**: CUDA plugin doesn't support operations with dynamic shape. +> **NOTE**: NVIDIA GPU plugin doesn't support operations with dynamic shape. ## Table of Contents -| Layers | CUDA plugin | +| Layers | NVIDIA GPU plugin | |------------------------------------------------------------------------------------------------------------------------------------------------|---------------| | [Abs](https://github.com/openvinotoolkit/openvino/blob/master/docs/ops/arithmetic/Abs_1.md) | Not Supported | | [Acos](https://github.com/openvinotoolkit/openvino/blob/master/docs/ops/arithmetic/Acos_1.md) | Not Supported | diff --git a/modules/cuda_plugin/docs/design-rationales/WorkbufferProvisioning.md b/modules/nvidia_plugin/docs/design-rationales/WorkbufferProvisioning.md similarity index 95% rename from modules/cuda_plugin/docs/design-rationales/WorkbufferProvisioning.md rename to modules/nvidia_plugin/docs/design-rationales/WorkbufferProvisioning.md index 1738655ff..8714b8969 100644 --- a/modules/cuda_plugin/docs/design-rationales/WorkbufferProvisioning.md +++ b/modules/nvidia_plugin/docs/design-rationales/WorkbufferProvisioning.md @@ -15,7 +15,7 @@ * From the Memory Manager point of view - a mutable workbuffer is an input/output tensor with its time box starting on T and lasting till T (1 slot in total) - an immutable workbuffer is an input/output tensor a time box spanning through the nework scope - - It's a special case which should work (but not tested in CUDAPlugin::MemorySolver) when producerIndex is equal to lastConsumerIndex. + - It's a special case which should work (but not tested in ov::nvidia_gpu::MemorySolver) when producerIndex is equal to lastConsumerIndex. Trying to use other values will keep buffer alive wirthout a reason. * Use several workbufers (i.e. a vector) the same way as for inputs and outputs could be as well beneficial for the following reasons: - The smaller workbuffer is, the easier to allocate it in a gaps between other memory segments, diff --git a/modules/cuda_plugin/include/cuda/cuda_config.hpp b/modules/nvidia_plugin/include/cuda/cuda_config.hpp similarity index 96% rename from modules/cuda_plugin/include/cuda/cuda_config.hpp rename to modules/nvidia_plugin/include/cuda/cuda_config.hpp index 45aace2d3..fe4385cc5 100644 --- a/modules/cuda_plugin/include/cuda/cuda_config.hpp +++ b/modules/nvidia_plugin/include/cuda/cuda_config.hpp @@ -51,7 +51,7 @@ DECLARE_CUDA_CONFIG_VALUE(YES); DECLARE_CUDA_CONFIG_VALUE(NO); /** - * @brief Defines the number of throutput streams used by CUDA plugin. + * @brief Defines the number of throutput streams used by NVIDIA GPU plugin. */ DECLARE_CUDA_CONFIG_VALUE(THROUGHPUT_AUTO); DECLARE_CUDA_CONFIG_KEY(THROUGHPUT_STREAMS); diff --git a/modules/cuda_plugin/include/gpu/gpu_context_api_cuda.hpp b/modules/nvidia_plugin/include/gpu/gpu_context_api_cuda.hpp similarity index 100% rename from modules/cuda_plugin/include/gpu/gpu_context_api_cuda.hpp rename to modules/nvidia_plugin/include/gpu/gpu_context_api_cuda.hpp diff --git a/modules/cuda_plugin/src/CMakeLists.txt b/modules/nvidia_plugin/src/CMakeLists.txt similarity index 97% rename from modules/cuda_plugin/src/CMakeLists.txt rename to modules/nvidia_plugin/src/CMakeLists.txt index 98f8b067c..2a5a4bde4 100644 --- a/modules/cuda_plugin/src/CMakeLists.txt +++ b/modules/nvidia_plugin/src/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -set(TARGET_NAME openvino_cuda_plugin) +set(TARGET_NAME openvino_nvidia_gpu_plugin) set(OBJ_NAME ${TARGET_NAME}_obj) set(SOURCE_MASKS *.cpp *.cu) @@ -29,7 +29,7 @@ target_compile_definitions(${OBJ_NAME} PRIVATE IMPLEMENT_INFERENCE_ENGINE_PLUGIN # Adds a shared library with plugin ie_add_plugin(NAME ${TARGET_NAME} - DEVICE_NAME "CUDA" + DEVICE_NAME "NVIDIA" SOURCES ${HEADERS} cuda_create_plugin.cpp SKIP_INSTALL # ATTENTION: uncomment to install component VERSION_DEFINES_FOR cuda_create_plugin.cpp) diff --git a/modules/cuda_plugin/src/cancellation_token.hpp b/modules/nvidia_plugin/src/cancellation_token.hpp similarity index 93% rename from modules/cuda_plugin/src/cancellation_token.hpp rename to modules/nvidia_plugin/src/cancellation_token.hpp index f63bb23b4..2577522f4 100644 --- a/modules/cuda_plugin/src/cancellation_token.hpp +++ b/modules/nvidia_plugin/src/cancellation_token.hpp @@ -11,7 +11,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class CancellationToken { public: @@ -45,4 +46,5 @@ class CancellationToken { std::function cancel_callback_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda/blas.hpp b/modules/nvidia_plugin/src/cuda/blas.hpp similarity index 89% rename from modules/cuda_plugin/src/cuda/blas.hpp rename to modules/nvidia_plugin/src/cuda/blas.hpp index c352b86ab..aa3224a54 100644 --- a/modules/cuda_plugin/src/cuda/blas.hpp +++ b/modules/nvidia_plugin/src/cuda/blas.hpp @@ -39,13 +39,13 @@ inline std::string cublasGetErrorString(cublasStatus_t status) { inline void throwIfError( cublasStatus_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != CUBLAS_STATUS_SUCCESS) CUDAPlugin::throwIEException(cublasGetErrorString(err), location); + if (err != CUBLAS_STATUS_SUCCESS) ov::nvidia_gpu::throwIEException(cublasGetErrorString(err), location); } inline void logIfError( cublasStatus_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != CUBLAS_STATUS_SUCCESS) CUDAPlugin::logError(cublasGetErrorString(err), location); + if (err != CUBLAS_STATUS_SUCCESS) ov::nvidia_gpu::logError(cublasGetErrorString(err), location); } namespace CUDA { diff --git a/modules/cuda_plugin/src/cuda/constant_factory.hpp b/modules/nvidia_plugin/src/cuda/constant_factory.hpp similarity index 99% rename from modules/cuda_plugin/src/cuda/constant_factory.hpp rename to modules/nvidia_plugin/src/cuda/constant_factory.hpp index a195ee0f6..051a953ff 100644 --- a/modules/cuda_plugin/src/cuda/constant_factory.hpp +++ b/modules/nvidia_plugin/src/cuda/constant_factory.hpp @@ -154,7 +154,7 @@ inline const constants::AnyNumeric& NumericConst(cudaDataType_t computeType) { return C::value; } default: - CUDAPlugin::throwIEException( + ov::nvidia_gpu::throwIEException( fmt::format("The ngraph element type {} is not supported by " "the cuda library", computeType)); diff --git a/modules/cuda_plugin/src/cuda/cuda_type_traits.hpp b/modules/nvidia_plugin/src/cuda/cuda_type_traits.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/cuda_type_traits.hpp rename to modules/nvidia_plugin/src/cuda/cuda_type_traits.hpp diff --git a/modules/cuda_plugin/src/cuda/descriptor_utils.cpp b/modules/nvidia_plugin/src/cuda/descriptor_utils.cpp similarity index 92% rename from modules/cuda_plugin/src/cuda/descriptor_utils.cpp rename to modules/nvidia_plugin/src/cuda/descriptor_utils.cpp index 02b8167a7..3162016b8 100644 --- a/modules/cuda_plugin/src/cuda/descriptor_utils.cpp +++ b/modules/nvidia_plugin/src/cuda/descriptor_utils.cpp @@ -23,7 +23,7 @@ DnnTensorDescriptor makeDnnTensorDescr(const ngraph::element::Type& type, const strides.back() = 1; for (int i = dims.size() - 1; i > 0; i--) strides[i - 1] = strides[i] * dims[i]; return DnnTensorDescriptor{}.set( - CUDAPlugin::convertDataType(type), dims.size(), dims.data(), strides.data()); + ov::nvidia_gpu::convertDataType(type), dims.size(), dims.data(), strides.data()); } CUDA::DnnTensorDescriptor makeInputDnnTensorDescr(const ov::Node& node, int n) { diff --git a/modules/cuda_plugin/src/cuda/descriptor_utils.hpp b/modules/nvidia_plugin/src/cuda/descriptor_utils.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/descriptor_utils.hpp rename to modules/nvidia_plugin/src/cuda/descriptor_utils.hpp diff --git a/modules/cuda_plugin/src/cuda/device_pointers.hpp b/modules/nvidia_plugin/src/cuda/device_pointers.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/device_pointers.hpp rename to modules/nvidia_plugin/src/cuda/device_pointers.hpp diff --git a/modules/cuda_plugin/src/cuda/dnn.hpp b/modules/nvidia_plugin/src/cuda/dnn.hpp similarity index 98% rename from modules/cuda_plugin/src/cuda/dnn.hpp rename to modules/nvidia_plugin/src/cuda/dnn.hpp index f6a9e7840..1bf4be568 100644 --- a/modules/cuda_plugin/src/cuda/dnn.hpp +++ b/modules/nvidia_plugin/src/cuda/dnn.hpp @@ -39,13 +39,13 @@ inline std::string cudnnGetErrorString(cudnnConvolutionFwdAlgo_t algo) { inline void throwIfError( cudnnStatus_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != CUDNN_STATUS_SUCCESS) CUDAPlugin::throwIEException(cudnnGetErrorString(err), location); + if (err != CUDNN_STATUS_SUCCESS) ov::nvidia_gpu::throwIEException(cudnnGetErrorString(err), location); } inline void logIfError( cudnnStatus_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != CUDNN_STATUS_SUCCESS) CUDAPlugin::logError(cudnnGetErrorString(err), location); + if (err != CUDNN_STATUS_SUCCESS) ov::nvidia_gpu::logError(cudnnGetErrorString(err), location); } namespace CUDA { diff --git a/modules/cuda_plugin/src/cuda/dnn_be.hpp b/modules/nvidia_plugin/src/cuda/dnn_be.hpp similarity index 99% rename from modules/cuda_plugin/src/cuda/dnn_be.hpp rename to modules/nvidia_plugin/src/cuda/dnn_be.hpp index 83fd3ea73..87926c97e 100644 --- a/modules/cuda_plugin/src/cuda/dnn_be.hpp +++ b/modules/nvidia_plugin/src/cuda/dnn_be.hpp @@ -517,7 +517,7 @@ class DnnBEEngineConfigDescriptor : public DnnBackendDescriptor { DnnBEEngine getEngine() const { auto engines = getBEDescAttributeValues(); - if (engines.size() != 1) CUDAPlugin::throwIEException("Unexpected number of cuDNN Backend engines"); + if (engines.size() != 1) ov::nvidia_gpu::throwIEException("Unexpected number of cuDNN Backend engines"); return std::move(*engines[0]); } diff --git a/modules/cuda_plugin/src/cuda/dnn_be_algo.hpp b/modules/nvidia_plugin/src/cuda/dnn_be_algo.hpp similarity index 98% rename from modules/cuda_plugin/src/cuda/dnn_be_algo.hpp rename to modules/nvidia_plugin/src/cuda/dnn_be_algo.hpp index 05cab7958..dc609e9a9 100644 --- a/modules/cuda_plugin/src/cuda/dnn_be_algo.hpp +++ b/modules/nvidia_plugin/src/cuda/dnn_be_algo.hpp @@ -69,7 +69,7 @@ std::shared_ptr performBenchmarks( [](const std::vector& workspace_sizes) -> std::optional> { for (const auto workspace_size : workspace_sizes) { try { - const auto aligned_workspace_size = CUDAPlugin::applyAllignment(workspace_size); + const auto aligned_workspace_size = ov::nvidia_gpu::applyAllignment(workspace_size); CUDA::DefaultAllocation workspace = CUDA::DefaultStream::stream().malloc(aligned_workspace_size); return std::optional>{ {std::move(workspace), workspace_size}}; diff --git a/modules/cuda_plugin/src/cuda/dnn_be_attrs.hpp b/modules/nvidia_plugin/src/cuda/dnn_be_attrs.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/dnn_be_attrs.hpp rename to modules/nvidia_plugin/src/cuda/dnn_be_attrs.hpp diff --git a/modules/cuda_plugin/src/cuda/dnn_be_desc.hpp b/modules/nvidia_plugin/src/cuda/dnn_be_desc.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/dnn_be_desc.hpp rename to modules/nvidia_plugin/src/cuda/dnn_be_desc.hpp diff --git a/modules/cuda_plugin/src/cuda/event.hpp b/modules/nvidia_plugin/src/cuda/event.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/event.hpp rename to modules/nvidia_plugin/src/cuda/event.hpp diff --git a/modules/cuda_plugin/src/cuda/float16.hpp b/modules/nvidia_plugin/src/cuda/float16.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/float16.hpp rename to modules/nvidia_plugin/src/cuda/float16.hpp diff --git a/modules/cuda_plugin/src/cuda/math.cuh b/modules/nvidia_plugin/src/cuda/math.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/math.cuh rename to modules/nvidia_plugin/src/cuda/math.cuh diff --git a/modules/cuda_plugin/src/cuda/props.cpp b/modules/nvidia_plugin/src/cuda/props.cpp similarity index 100% rename from modules/cuda_plugin/src/cuda/props.cpp rename to modules/nvidia_plugin/src/cuda/props.cpp diff --git a/modules/cuda_plugin/src/cuda/props.hpp b/modules/nvidia_plugin/src/cuda/props.hpp similarity index 100% rename from modules/cuda_plugin/src/cuda/props.hpp rename to modules/nvidia_plugin/src/cuda/props.hpp diff --git a/modules/cuda_plugin/src/cuda/runtime.hpp b/modules/nvidia_plugin/src/cuda/runtime.hpp similarity index 98% rename from modules/cuda_plugin/src/cuda/runtime.hpp rename to modules/nvidia_plugin/src/cuda/runtime.hpp index c92964b07..875c2829d 100644 --- a/modules/cuda_plugin/src/cuda/runtime.hpp +++ b/modules/nvidia_plugin/src/cuda/runtime.hpp @@ -16,13 +16,13 @@ inline void throwIfError( cudaError_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != cudaSuccess) CUDAPlugin::throwIEException(cudaGetErrorString(err), location); + if (err != cudaSuccess) ov::nvidia_gpu::throwIEException(cudaGetErrorString(err), location); } inline void logIfError( cudaError_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != cudaSuccess) CUDAPlugin::logError(cudaGetErrorString(err), location); + if (err != cudaSuccess) ov::nvidia_gpu::logError(cudaGetErrorString(err), location); } namespace CUDA { diff --git a/modules/cuda_plugin/src/cuda/stl/algorithms/sort.cuh b/modules/nvidia_plugin/src/cuda/stl/algorithms/sort.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/algorithms/sort.cuh rename to modules/nvidia_plugin/src/cuda/stl/algorithms/sort.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/array.cuh b/modules/nvidia_plugin/src/cuda/stl/array.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/array.cuh rename to modules/nvidia_plugin/src/cuda/stl/array.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/atomic.cuh b/modules/nvidia_plugin/src/cuda/stl/atomic.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/atomic.cuh rename to modules/nvidia_plugin/src/cuda/stl/atomic.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/mdspan.cuh b/modules/nvidia_plugin/src/cuda/stl/mdspan.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/mdspan.cuh rename to modules/nvidia_plugin/src/cuda/stl/mdspan.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/mdvector.cuh b/modules/nvidia_plugin/src/cuda/stl/mdvector.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/mdvector.cuh rename to modules/nvidia_plugin/src/cuda/stl/mdvector.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/pair.cuh b/modules/nvidia_plugin/src/cuda/stl/pair.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/pair.cuh rename to modules/nvidia_plugin/src/cuda/stl/pair.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/span.cuh b/modules/nvidia_plugin/src/cuda/stl/span.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/span.cuh rename to modules/nvidia_plugin/src/cuda/stl/span.cuh diff --git a/modules/cuda_plugin/src/cuda/stl/vector.cuh b/modules/nvidia_plugin/src/cuda/stl/vector.cuh similarity index 100% rename from modules/cuda_plugin/src/cuda/stl/vector.cuh rename to modules/nvidia_plugin/src/cuda/stl/vector.cuh diff --git a/modules/cuda_plugin/src/cuda/tensor.hpp b/modules/nvidia_plugin/src/cuda/tensor.hpp similarity index 74% rename from modules/cuda_plugin/src/cuda/tensor.hpp rename to modules/nvidia_plugin/src/cuda/tensor.hpp index ff7fb9e77..b577927cb 100644 --- a/modules/cuda_plugin/src/cuda/tensor.hpp +++ b/modules/nvidia_plugin/src/cuda/tensor.hpp @@ -11,13 +11,13 @@ inline void throwIfError( cutensorStatus_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != CUTENSOR_STATUS_SUCCESS) CUDAPlugin::throwIEException(cutensorGetErrorString(err), location); + if (err != CUTENSOR_STATUS_SUCCESS) ov::nvidia_gpu::throwIEException(cutensorGetErrorString(err), location); } inline void logIfError( cutensorStatus_t err, const std::experimental::source_location& location = std::experimental::source_location::current()) { - if (err != CUTENSOR_STATUS_SUCCESS) CUDAPlugin::logError(cutensorGetErrorString(err), location); + if (err != CUTENSOR_STATUS_SUCCESS) ov::nvidia_gpu::logError(cutensorGetErrorString(err), location); } namespace CUDA { diff --git a/modules/cuda_plugin/src/cuda_async_infer_request.cpp b/modules/nvidia_plugin/src/cuda_async_infer_request.cpp similarity index 81% rename from modules/cuda_plugin/src/cuda_async_infer_request.cpp rename to modules/nvidia_plugin/src/cuda_async_infer_request.cpp index 78770beb8..001cb9cec 100644 --- a/modules/cuda_plugin/src/cuda_async_infer_request.cpp +++ b/modules/nvidia_plugin/src/cuda_async_infer_request.cpp @@ -10,7 +10,8 @@ #include "cuda_itt.hpp" #include "cuda_thread_pool.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { CudaAsyncInferRequest::CudaAsyncInferRequest(const CudaInferRequest::Ptr& inferRequest, const InferenceEngine::ITaskExecutor::Ptr& cpuTaskExecutor, @@ -28,23 +29,23 @@ CudaAsyncInferRequest::CudaAsyncInferRequest(const CudaInferRequest::Ptr& inferR if (remoteDevice) { _pipeline = {{cpuTaskExecutor, [this] { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "CudaAsyncInferRequest::Preprocessing"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "CudaAsyncInferRequest::Preprocessing"); _inferRequest->inferPreprocess(); }}, {waitExecutor, [this, cudaThreadPool] { auto& threadContext = cudaThreadPool->GetThreadContext(); { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "CudaAsyncInferRequest::StartPipeline"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "CudaAsyncInferRequest::StartPipeline"); _inferRequest->startPipeline(threadContext); } { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "CudaAsyncInferRequest::WaitPipeline"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "CudaAsyncInferRequest::WaitPipeline"); _inferRequest->waitPipeline(threadContext); } }}, {cpuTaskExecutor, [this] { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "CudaAsyncInferRequest::Postprocessing"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "CudaAsyncInferRequest::Postprocessing"); _inferRequest->inferPostprocess(); }}}; } @@ -57,4 +58,5 @@ void CudaAsyncInferRequest::Cancel() { void CudaAsyncInferRequest::Infer_ThreadUnsafe() { StartAsync_ThreadUnsafe(); } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_async_infer_request.hpp b/modules/nvidia_plugin/src/cuda_async_infer_request.hpp similarity index 91% rename from modules/cuda_plugin/src/cuda_async_infer_request.hpp rename to modules/nvidia_plugin/src/cuda_async_infer_request.hpp index 60b2f199c..af3e7403f 100644 --- a/modules/cuda_plugin/src/cuda_async_infer_request.hpp +++ b/modules/nvidia_plugin/src/cuda_async_infer_request.hpp @@ -8,7 +8,8 @@ #include "cuda_infer_request.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class CudaAsyncInferRequest : public InferenceEngine::AsyncInferRequestThreadSafeDefault { public: @@ -30,4 +31,5 @@ class CudaAsyncInferRequest : public InferenceEngine::AsyncInferRequestThreadSaf CudaInferRequest::Ptr _inferRequest; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_config.cpp b/modules/nvidia_plugin/src/cuda_config.cpp similarity index 99% rename from modules/cuda_plugin/src/cuda_config.cpp rename to modules/nvidia_plugin/src/cuda_config.cpp index 21c932e1e..a1bf46669 100644 --- a/modules/cuda_plugin/src/cuda_config.cpp +++ b/modules/nvidia_plugin/src/cuda_config.cpp @@ -9,7 +9,7 @@ #include #include -using namespace CUDAPlugin; +using namespace ov::nvidia_gpu; Configuration::Configuration() {} diff --git a/modules/cuda_plugin/src/cuda_config.hpp b/modules/nvidia_plugin/src/cuda_config.hpp similarity index 94% rename from modules/cuda_plugin/src/cuda_config.hpp rename to modules/nvidia_plugin/src/cuda_config.hpp index 8c243f727..18267cef4 100644 --- a/modules/cuda_plugin/src/cuda_config.hpp +++ b/modules/nvidia_plugin/src/cuda_config.hpp @@ -12,7 +12,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { using ConfigMap = std::map; @@ -43,4 +44,5 @@ struct Configuration { ov::hint::PerformanceMode performance_mode = ov::hint::PerformanceMode::UNDEFINED; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_create_plugin.cpp b/modules/nvidia_plugin/src/cuda_create_plugin.cpp similarity index 69% rename from modules/cuda_plugin/src/cuda_create_plugin.cpp rename to modules/nvidia_plugin/src/cuda_create_plugin.cpp index 9b27eda7c..a50a66394 100644 --- a/modules/cuda_plugin/src/cuda_create_plugin.cpp +++ b/modules/nvidia_plugin/src/cuda_create_plugin.cpp @@ -4,12 +4,14 @@ #include "cuda_plugin.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace { -const InferenceEngine::Version version{{2, 1}, CI_BUILD_NUMBER, "openvino_cuda_plugin"}; +const InferenceEngine::Version version{{2, 1}, CI_BUILD_NUMBER, "openvino_nvidia_gpu_plugin"}; IE_DEFINE_PLUGIN_CREATE_FUNCTION(Plugin, version) } // namespace -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_creation_context.hpp b/modules/nvidia_plugin/src/cuda_creation_context.hpp similarity index 88% rename from modules/cuda_plugin/src/cuda_creation_context.hpp rename to modules/nvidia_plugin/src/cuda_creation_context.hpp index 40118bb10..0fa2986b3 100644 --- a/modules/cuda_plugin/src/cuda_creation_context.hpp +++ b/modules/nvidia_plugin/src/cuda_creation_context.hpp @@ -10,7 +10,8 @@ #include "cuda/dnn.hpp" #include "cuda/tensor.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class CreationContext { CUDA::Device device_; @@ -25,4 +26,5 @@ class CreationContext { bool opBenchOption() const noexcept { return op_bench_option_; } }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_executable_network.cpp b/modules/nvidia_plugin/src/cuda_executable_network.cpp similarity index 99% rename from modules/cuda_plugin/src/cuda_executable_network.cpp rename to modules/nvidia_plugin/src/cuda_executable_network.cpp index bff59726e..5816d3a41 100644 --- a/modules/cuda_plugin/src/cuda_executable_network.cpp +++ b/modules/nvidia_plugin/src/cuda_executable_network.cpp @@ -30,7 +30,8 @@ #include "transformations/utils/utils.hpp" #include "transformer/cuda_graph_transformer.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { using Time = std::chrono::steady_clock; @@ -366,7 +367,7 @@ InferenceEngine::Parameter ExecutableNetwork::GetMetric(const std::string& name) std::shared_ptr ExecutableNetwork::GetExecGraphInfo() { return function_; } void ExecutableNetwork::Export(std::ostream& modelStream) { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "ExecutableNetwork::Export"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "ExecutableNetwork::Export"); // Note: custom ngraph extensions are not supported std::stringstream xmlFile, binFile; @@ -393,4 +394,5 @@ void ExecutableNetwork::Export(std::ostream& modelStream) { // TODO: implement network precision, layout, preprocessing info serialization } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_executable_network.hpp b/modules/nvidia_plugin/src/cuda_executable_network.hpp similarity index 97% rename from modules/cuda_plugin/src/cuda_executable_network.hpp rename to modules/nvidia_plugin/src/cuda_executable_network.hpp index 85c2b0392..4d06c7b5e 100644 --- a/modules/cuda_plugin/src/cuda_executable_network.hpp +++ b/modules/nvidia_plugin/src/cuda_executable_network.hpp @@ -20,7 +20,8 @@ class ExecNetworkTest; -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class Plugin; @@ -92,4 +93,5 @@ class ExecutableNetwork : public InferenceEngine::ExecutableNetworkThreadSafeDef std::shared_ptr memory_pool_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_graph.cpp b/modules/nvidia_plugin/src/cuda_graph.cpp similarity index 86% rename from modules/cuda_plugin/src/cuda_graph.cpp rename to modules/nvidia_plugin/src/cuda_graph.cpp index 83afe045a..369e4d655 100644 --- a/modules/cuda_plugin/src/cuda_graph.cpp +++ b/modules/nvidia_plugin/src/cuda_graph.cpp @@ -4,7 +4,8 @@ #include "cuda_graph.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { CudaGraph::CudaGraph(const CreationContext& context, const std::shared_ptr& function) : SubGraph(context, function) {} @@ -15,4 +16,5 @@ void CudaGraph::Run(const InferenceRequestContext& context, const DeviceMemBlock SubGraph::Execute(context, {}, {}, workbuffers); } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_graph.hpp b/modules/nvidia_plugin/src/cuda_graph.hpp similarity index 85% rename from modules/cuda_plugin/src/cuda_graph.hpp rename to modules/nvidia_plugin/src/cuda_graph.hpp index e778d7956..73a8d27bf 100644 --- a/modules/cuda_plugin/src/cuda_graph.hpp +++ b/modules/nvidia_plugin/src/cuda_graph.hpp @@ -8,7 +8,8 @@ class ExecNetworkTest; -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class CudaGraph final : public SubGraph { public: @@ -20,4 +21,5 @@ class CudaGraph final : public SubGraph { void Run(const InferenceRequestContext& context, const DeviceMemBlock& memoryBlock) const; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_infer_request.cpp b/modules/nvidia_plugin/src/cuda_infer_request.cpp similarity index 98% rename from modules/cuda_plugin/src/cuda_infer_request.cpp rename to modules/nvidia_plugin/src/cuda_infer_request.cpp index c6355082b..8c5084b66 100644 --- a/modules/cuda_plugin/src/cuda_infer_request.cpp +++ b/modules/nvidia_plugin/src/cuda_infer_request.cpp @@ -28,7 +28,8 @@ using namespace InferenceEngine; -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { using namespace utils; using Time = std::chrono::steady_clock; @@ -163,7 +164,7 @@ void CudaInferRequest::createInferRequest() { } void CudaInferRequest::inferPreprocess() { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, _profilingTask[Profiler::Preprocess]); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, _profilingTask[Profiler::Preprocess]); cancellation_token_.Check(); profiler_.StartStage(); IInferRequestInternal::convertBatchedInputBlobs(); @@ -196,7 +197,7 @@ void CudaInferRequest::inferPreprocess() { for (size_t i = 0; i < blockDims.size(); i++) { const size_t rev_idx = blockDims.size() - i - 1; OPENVINO_ASSERT(order.at(rev_idx) == rev_idx, - "CUDAPlugin: unsupported tensors with mixed axes order: ", + "ov::nvidia_gpu: unsupported tensors with mixed axes order: ", ngraph::vector_to_string(order)); if (strides.at(rev_idx) != exp_stride || offsetPaddingToData.at(rev_idx) != 0) { return false; @@ -212,7 +213,7 @@ void CudaInferRequest::inferPreprocess() { std::make_shared(parameterType, parameterShape, mem_blob->rmap().as()); } else { OPENVINO_ASSERT(parameterType.bitwidth() % 8 == 0, - "CUDAPlugin: Unsupported ROI tensor with element type having ", + "ov::nvidia_gpu: Unsupported ROI tensor with element type having ", std::to_string(parameterType.bitwidth()), " bits size"); // Perform manual extraction of ROI tensor @@ -222,7 +223,7 @@ void CudaInferRequest::inferPreprocess() { auto desc = mem_blob->getTensorDesc(); auto* src_data = mem_blob->rmap().as(); auto dst_tensor = std::dynamic_pointer_cast(input_tensors_.at(index)); - OPENVINO_ASSERT(dst_tensor, "CUDAPlugin error: Can't cast created tensor to HostTensor"); + OPENVINO_ASSERT(dst_tensor, "nvidia_gpu error: Can't cast created tensor to HostTensor"); auto* dst_data = dst_tensor->get_data_ptr(); std::vector indexes(parameterShape.size()); for (size_t dst_idx = 0; dst_idx < ov::shape_size(parameterShape); dst_idx++) { @@ -266,7 +267,7 @@ void CudaInferRequest::inferPreprocess() { void CudaInferRequest::startPipeline(const ThreadContext& threadContext) { try { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, _profilingTask[Profiler::StartPipeline]) + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, _profilingTask[Profiler::StartPipeline]) profiler_.StartStage(); memory_proxy_ = _executableNetwork->memory_pool_->WaitAndGet(cancellation_token_); auto& memory = memory_proxy_->Get(); @@ -290,7 +291,7 @@ void CudaInferRequest::startPipeline(const ThreadContext& threadContext) { } void CudaInferRequest::waitPipeline(const ThreadContext& threadContext) { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, _profilingTask[Profiler::WaitPipeline]) + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, _profilingTask[Profiler::WaitPipeline]) cancellation_token_.Check(); profiler_.StartStage(); // TODO: probably all time will be spent in synchonize, out of reach of ThrowIfCanceled @@ -300,7 +301,7 @@ void CudaInferRequest::waitPipeline(const ThreadContext& threadContext) { } void CudaInferRequest::inferPostprocess() { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, _profilingTask[Profiler::Postprocess]); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, _profilingTask[Profiler::Postprocess]); cancellation_token_.Check(); profiler_.StartStage(); for (auto&& output : _outputs) { @@ -731,4 +732,5 @@ void CudaInferRequest::convertPrecision(const Blob::Ptr& src, const Blob::Ptr& d } } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_infer_request.hpp b/modules/nvidia_plugin/src/cuda_infer_request.hpp similarity index 98% rename from modules/cuda_plugin/src/cuda_infer_request.hpp rename to modules/nvidia_plugin/src/cuda_infer_request.hpp index 63bbe1785..a185528e1 100644 --- a/modules/cuda_plugin/src/cuda_infer_request.hpp +++ b/modules/nvidia_plugin/src/cuda_infer_request.hpp @@ -25,7 +25,8 @@ #include "memory_manager/cuda_memory_pool.hpp" #include "utils/perf_timing.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class ExecutableNetwork; @@ -107,4 +108,5 @@ class CudaInferRequest : public InferenceEngine::IInferRequestInternal { }; // ! [infer_request:header] -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_inference_request_context.hpp b/modules/nvidia_plugin/src/cuda_inference_request_context.hpp similarity index 95% rename from modules/cuda_plugin/src/cuda_inference_request_context.hpp rename to modules/nvidia_plugin/src/cuda_inference_request_context.hpp index 42484f289..2f535f9ae 100644 --- a/modules/cuda_plugin/src/cuda_inference_request_context.hpp +++ b/modules/nvidia_plugin/src/cuda_inference_request_context.hpp @@ -11,7 +11,8 @@ #include "cancellation_token.hpp" #include "cuda_thread_context.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { using Blob = InferenceEngine::Blob; @@ -81,7 +82,7 @@ class InferenceRequestContext { return outputs_mapping.find(output_name) != outputs_mapping.end(); } const ThreadContext& getThreadContext() const noexcept { return threadContext; } - [[nodiscard]] CUDAPlugin::CancellationToken& getCancellationToken() const noexcept { return token; } + [[nodiscard]] ov::nvidia_gpu::CancellationToken& getCancellationToken() const noexcept { return token; } [[nodiscard]] Profiler& getProfiler() const noexcept { return profiler; } [[nodiscard]] bool isBenchmarkMode() const noexcept { return is_benchmark_mode_; } @@ -96,4 +97,5 @@ class InferenceRequestContext { bool is_benchmark_mode_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_itt.hpp b/modules/nvidia_plugin/src/cuda_itt.hpp similarity index 70% rename from modules/cuda_plugin/src/cuda_itt.hpp rename to modules/nvidia_plugin/src/cuda_itt.hpp index c410dd2f7..ff6057e9c 100644 --- a/modules/cuda_plugin/src/cuda_itt.hpp +++ b/modules/nvidia_plugin/src/cuda_itt.hpp @@ -11,10 +11,12 @@ #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace itt { namespace domains { -OV_ITT_DOMAIN(CUDAPlugin); +OV_ITT_DOMAIN(nvidia_gpu); } } // namespace itt -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_jthread.hpp b/modules/nvidia_plugin/src/cuda_jthread.hpp similarity index 89% rename from modules/cuda_plugin/src/cuda_jthread.hpp rename to modules/nvidia_plugin/src/cuda_jthread.hpp index c4aea167b..6c96aa2dc 100644 --- a/modules/cuda_plugin/src/cuda_jthread.hpp +++ b/modules/nvidia_plugin/src/cuda_jthread.hpp @@ -6,7 +6,8 @@ #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class CudaJThread final { public: @@ -29,4 +30,5 @@ class CudaJThread final { std::thread thread_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_latch.hpp b/modules/nvidia_plugin/src/cuda_latch.hpp similarity index 85% rename from modules/cuda_plugin/src/cuda_latch.hpp rename to modules/nvidia_plugin/src/cuda_latch.hpp index 8309e007c..7636c78b7 100644 --- a/modules/cuda_plugin/src/cuda_latch.hpp +++ b/modules/nvidia_plugin/src/cuda_latch.hpp @@ -7,7 +7,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { /// Temporary replacement for `std::latch` (until C++20) class CudaLatch final { @@ -25,4 +26,5 @@ class CudaLatch final { std::promise p_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_op_buffers_extractor.cpp b/modules/nvidia_plugin/src/cuda_op_buffers_extractor.cpp similarity index 99% rename from modules/cuda_plugin/src/cuda_op_buffers_extractor.cpp rename to modules/nvidia_plugin/src/cuda_op_buffers_extractor.cpp index 6b17b6b8c..5b912321f 100644 --- a/modules/cuda_plugin/src/cuda_op_buffers_extractor.cpp +++ b/modules/nvidia_plugin/src/cuda_op_buffers_extractor.cpp @@ -19,7 +19,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { OperationBuffersExtractor::OperationBuffersExtractor(gsl::span ordered_nodes, bool is_stable_params, @@ -344,4 +345,5 @@ void OperationBuffersExtractor::ThrowGraphIsBadFormedError(const ov::Inputget_name())); } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_op_buffers_extractor.hpp b/modules/nvidia_plugin/src/cuda_op_buffers_extractor.hpp similarity index 99% rename from modules/cuda_plugin/src/cuda_op_buffers_extractor.hpp rename to modules/nvidia_plugin/src/cuda_op_buffers_extractor.hpp index de54e7ad9..2e18cf7d5 100644 --- a/modules/cuda_plugin/src/cuda_op_buffers_extractor.hpp +++ b/modules/nvidia_plugin/src/cuda_op_buffers_extractor.hpp @@ -17,7 +17,8 @@ #include "memory_manager/cuda_workbuffers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { /** * Extracts intermediate buffer ids from intermediate representation. @@ -274,4 +275,5 @@ class OperationBuffersExtractor { const unsigned long num_ordered_nodes_ = 0; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_operation_base.cpp b/modules/nvidia_plugin/src/cuda_operation_base.cpp similarity index 86% rename from modules/cuda_plugin/src/cuda_operation_base.cpp rename to modules/nvidia_plugin/src/cuda_operation_base.cpp index 0a9af2c18..7025a8903 100644 --- a/modules/cuda_plugin/src/cuda_operation_base.cpp +++ b/modules/nvidia_plugin/src/cuda_operation_base.cpp @@ -7,7 +7,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { OperationBase::OperationBase(const CreationContext& /*context*/, const ov::Node& node, @@ -18,4 +19,5 @@ OperationBase::OperationBase(const CreationContext& /*context*/, input_ids_{move(inputIds)}, output_ids_{move(outputIds)} {} -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_operation_base.hpp b/modules/nvidia_plugin/src/cuda_operation_base.hpp similarity index 98% rename from modules/cuda_plugin/src/cuda_operation_base.hpp rename to modules/nvidia_plugin/src/cuda_operation_base.hpp index 52f088a29..90e9e0a53 100644 --- a/modules/cuda_plugin/src/cuda_operation_base.hpp +++ b/modules/nvidia_plugin/src/cuda_operation_base.hpp @@ -24,7 +24,8 @@ class Node; } -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { template using DevicePointer = CUDA::DevicePointer; @@ -128,4 +129,5 @@ template ConcreteOperator& downcast(const std::shared_ptr& node) { return dynamic_cast(*node.get()); } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_operation_registry.cpp b/modules/nvidia_plugin/src/cuda_operation_registry.cpp similarity index 96% rename from modules/cuda_plugin/src/cuda_operation_registry.cpp rename to modules/nvidia_plugin/src/cuda_operation_registry.cpp index 528c0bc29..dcb5c2a49 100644 --- a/modules/cuda_plugin/src/cuda_operation_registry.cpp +++ b/modules/nvidia_plugin/src/cuda_operation_registry.cpp @@ -6,7 +6,8 @@ #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { OperationRegistry& OperationRegistry::getInstance() { static OperationRegistry registry; @@ -49,4 +50,5 @@ OperationBase::Ptr OperationRegistry::createOperation(const CreationContext& con return createOperation(context, node, toVector(inIds), toVector(outIds)); } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_operation_registry.hpp b/modules/nvidia_plugin/src/cuda_operation_registry.hpp similarity index 94% rename from modules/cuda_plugin/src/cuda_operation_registry.hpp rename to modules/nvidia_plugin/src/cuda_operation_registry.hpp index a16b75532..83d5b7495 100644 --- a/modules/cuda_plugin/src/cuda_operation_registry.hpp +++ b/modules/nvidia_plugin/src/cuda_operation_registry.hpp @@ -11,7 +11,8 @@ #include "cuda_operation_base.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace details { @@ -114,7 +115,8 @@ class OperationRegistry::Register { } }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov /** * @macro OPERATION_REGISTER @@ -129,11 +131,11 @@ class OperationRegistry::Register { */ #define OPERATION_REGISTER(type, name) \ extern "C" { \ - [[maybe_unused]] const ::CUDAPlugin::OperationRegistry::Register openvino_cuda_op_register_##name{#name}; \ + [[maybe_unused]] const ::ov::nvidia_gpu::OperationRegistry::Register openvino_cuda_op_register_##name{#name}; \ } #define OPERATION_REGISTER_FACTORY(factory, name) \ extern "C" { \ - [[maybe_unused]] const ::CUDAPlugin::OperationRegistry::Register openvino_cuda_op_register_##name{ \ + [[maybe_unused]] const ::ov::nvidia_gpu::OperationRegistry::Register openvino_cuda_op_register_##name{ \ #name, factory}; \ } diff --git a/modules/cuda_plugin/src/cuda_plugin.cpp b/modules/nvidia_plugin/src/cuda_plugin.cpp similarity index 97% rename from modules/cuda_plugin/src/cuda_plugin.cpp rename to modules/nvidia_plugin/src/cuda_plugin.cpp index c221390f2..1de6f4421 100644 --- a/modules/cuda_plugin/src/cuda_plugin.cpp +++ b/modules/nvidia_plugin/src/cuda_plugin.cpp @@ -24,9 +24,9 @@ #include "cuda_operation_registry.hpp" #include "cuda_plugin.hpp" #include "openvino/runtime/properties.hpp" -using namespace CUDAPlugin; +using namespace ov::nvidia_gpu; -Plugin::Plugin() { _pluginName = "CUDA"; } +Plugin::Plugin() { _pluginName = "NVIDIA"; } Plugin::~Plugin() { // Plugin should remove executors from executor cache to avoid threads number growth in the whole application @@ -37,7 +37,7 @@ Plugin::~Plugin() { InferenceEngine::IExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network, const ConfigMap& config) { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "Plugin::LoadExeNetworkImpl"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "Plugin::LoadExeNetworkImpl"); auto cfg = Configuration{config, _cfg}; InferenceEngine::InputsDataMap networkInputs = network.getInputsInfo(); @@ -96,7 +96,7 @@ InferenceEngine::ITaskExecutor::Ptr Plugin::GetStreamExecutor(const Configuratio InferenceEngine::IExecutableNetworkInternal::Ptr Plugin::ImportNetwork( std::istream& model, const std::map& config) { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "CUDAPlugin::ImportNetworkImpl"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "ov::nvidia_gpu::ImportNetworkImpl"); Configuration cfg{config, _cfg}; auto waitExecutor = GetStreamExecutor(cfg); @@ -108,7 +108,7 @@ InferenceEngine::IExecutableNetworkInternal::Ptr Plugin::ImportNetwork( InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine::CNNNetwork& network, const ConfigMap& config) const { - OV_ITT_SCOPED_TASK(itt::domains::CUDAPlugin, "CUDAPlugin::QueryNetwork"); + OV_ITT_SCOPED_TASK(itt::domains::nvidia_gpu, "ov::nvidia_gpu::QueryNetwork"); InferenceEngine::QueryNetworkResult res; Configuration cfg{config, _cfg, false}; diff --git a/modules/cuda_plugin/src/cuda_plugin.hpp b/modules/nvidia_plugin/src/cuda_plugin.hpp similarity index 96% rename from modules/cuda_plugin/src/cuda_plugin.hpp rename to modules/nvidia_plugin/src/cuda_plugin.hpp index 1a5279af9..d4ff80fc4 100644 --- a/modules/cuda_plugin/src/cuda_plugin.hpp +++ b/modules/nvidia_plugin/src/cuda_plugin.hpp @@ -11,7 +11,8 @@ #include "cuda_thread_pool.hpp" #include "transformer/cuda_graph_transformer.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class Plugin : public InferenceEngine::IInferencePlugin { public: @@ -63,4 +64,5 @@ class Plugin : public InferenceEngine::IInferencePlugin { template <> std::string Plugin::getCudaAttribute() const; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_plugin_host.cpp b/modules/nvidia_plugin/src/cuda_plugin_host.cpp similarity index 78% rename from modules/cuda_plugin/src/cuda_plugin_host.cpp rename to modules/nvidia_plugin/src/cuda_plugin_host.cpp index e4b63f50d..81d65ab93 100644 --- a/modules/cuda_plugin/src/cuda_plugin_host.cpp +++ b/modules/nvidia_plugin/src/cuda_plugin_host.cpp @@ -6,9 +6,11 @@ #include "cuda_plugin.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { template <> std::string Plugin::getCudaAttribute() const { return CUDA::Device{cudaDeviceID()}.props().name; } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_profiler.cpp b/modules/nvidia_plugin/src/cuda_profiler.cpp similarity index 98% rename from modules/cuda_plugin/src/cuda_profiler.cpp rename to modules/nvidia_plugin/src/cuda_profiler.cpp index a33fa90fb..f5e28f866 100644 --- a/modules/cuda_plugin/src/cuda_profiler.cpp +++ b/modules/nvidia_plugin/src/cuda_profiler.cpp @@ -7,7 +7,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace { @@ -142,4 +143,5 @@ void Profiler::CollectNodeVisitor(const OperationBase::Ptr& execStep, } } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_profiler.hpp b/modules/nvidia_plugin/src/cuda_profiler.hpp similarity index 98% rename from modules/cuda_plugin/src/cuda_profiler.hpp rename to modules/nvidia_plugin/src/cuda_profiler.hpp index 5b8f5f3ad..83cc162ce 100644 --- a/modules/cuda_plugin/src/cuda_profiler.hpp +++ b/modules/nvidia_plugin/src/cuda_profiler.hpp @@ -13,7 +13,8 @@ #include "cuda_graph.hpp" #include "cuda_operation_base.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { /** * Creates profiler sequence and stores profiler results. @@ -205,4 +206,5 @@ class Profiler::ProfilerSequence { const size_t index_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_thread_context.hpp b/modules/nvidia_plugin/src/cuda_thread_context.hpp similarity index 91% rename from modules/cuda_plugin/src/cuda_thread_context.hpp rename to modules/nvidia_plugin/src/cuda_thread_context.hpp index d86f19b01..da5d9c55b 100644 --- a/modules/cuda_plugin/src/cuda_thread_context.hpp +++ b/modules/nvidia_plugin/src/cuda_thread_context.hpp @@ -8,7 +8,8 @@ #include "cuda/dnn.hpp" #include "cuda/tensor.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class ThreadContext { CUDA::Device device_; @@ -29,4 +30,5 @@ class ThreadContext { const CUDA::CuTensorHandle& cuTensorHandle() const noexcept { return cuTensorHandle_; } }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_thread_pool.cpp b/modules/nvidia_plugin/src/cuda_thread_pool.cpp similarity index 96% rename from modules/cuda_plugin/src/cuda_thread_pool.cpp rename to modules/nvidia_plugin/src/cuda_thread_pool.cpp index c8d7a9f0f..e63bed32c 100644 --- a/modules/cuda_plugin/src/cuda_thread_pool.cpp +++ b/modules/nvidia_plugin/src/cuda_thread_pool.cpp @@ -10,7 +10,8 @@ #include "cuda_latch.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { static thread_local ThreadContext* contextPtr = nullptr; @@ -76,4 +77,5 @@ void CudaThreadPool::run(Task task) { queue_cond_var_.notify_one(); } -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/cuda_thread_pool.hpp b/modules/nvidia_plugin/src/cuda_thread_pool.hpp similarity index 90% rename from modules/cuda_plugin/src/cuda_thread_pool.hpp rename to modules/nvidia_plugin/src/cuda_thread_pool.hpp index 3f9d279ec..b1c90a5af 100644 --- a/modules/cuda_plugin/src/cuda_thread_pool.hpp +++ b/modules/nvidia_plugin/src/cuda_thread_pool.hpp @@ -15,7 +15,8 @@ #include "cuda_jthread.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { class CudaThreadPool : public InferenceEngine::ITaskExecutor { public: @@ -36,4 +37,5 @@ class CudaThreadPool : public InferenceEngine::ITaskExecutor { std::vector threads_; }; -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/error.cpp b/modules/nvidia_plugin/src/error.cpp similarity index 93% rename from modules/cuda_plugin/src/error.cpp rename to modules/nvidia_plugin/src/error.cpp index d1774120f..9755a50c7 100644 --- a/modules/cuda_plugin/src/error.cpp +++ b/modules/nvidia_plugin/src/error.cpp @@ -8,7 +8,8 @@ #include
-namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace { template [[gnu::cold, noreturn]] void throwException(const std::string& msg, @@ -34,4 +35,5 @@ template [[gnu::cold]] void logError(const std::string& /*msg*/, const std::experimental::source_location& /*location*/) { } // TODO: log somewhere -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/error.hpp b/modules/nvidia_plugin/src/error.hpp similarity index 91% rename from modules/cuda_plugin/src/error.hpp rename to modules/nvidia_plugin/src/error.hpp index f0df715a6..11c799ac2 100644 --- a/modules/cuda_plugin/src/error.hpp +++ b/modules/nvidia_plugin/src/error.hpp @@ -7,7 +7,8 @@ #include "kernels/error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { [[gnu::cold, noreturn]] void throwIEException( const std::string& msg, const std::experimental::source_location& location = std::experimental::source_location::current()); @@ -20,4 +21,5 @@ namespace CUDAPlugin { [[gnu::cold]] void logError( const std::string& msg, const std::experimental::source_location& location = std::experimental::source_location::current()); -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/add.cu b/modules/nvidia_plugin/src/kernels/add.cu similarity index 90% rename from modules/cuda_plugin/src/kernels/add.cu rename to modules/nvidia_plugin/src/kernels/add.cu index a02772e5d..90f424747 100644 --- a/modules/cuda_plugin/src/kernels/add.cu +++ b/modules/nvidia_plugin/src/kernels/add.cu @@ -4,7 +4,8 @@ #include "add.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -25,4 +26,5 @@ void Add::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/add.hpp b/modules/nvidia_plugin/src/kernels/add.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/add.hpp rename to modules/nvidia_plugin/src/kernels/add.hpp index c4e58f5bc..9feb94d5b 100644 --- a/modules/cuda_plugin/src/kernels/add.hpp +++ b/modules/nvidia_plugin/src/kernels/add.hpp @@ -6,7 +6,8 @@ #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -32,4 +33,5 @@ class Add { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/broadcast.cu b/modules/nvidia_plugin/src/kernels/broadcast.cu similarity index 89% rename from modules/cuda_plugin/src/kernels/broadcast.cu rename to modules/nvidia_plugin/src/kernels/broadcast.cu index b25fa5b2c..de053fa5c 100644 --- a/modules/cuda_plugin/src/kernels/broadcast.cu +++ b/modules/nvidia_plugin/src/kernels/broadcast.cu @@ -7,7 +7,8 @@ #include "broadcast.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -20,7 +21,7 @@ static __global__ void broadcast(const T* src, NumpyBroadcastMapper src_mapper, dst[dst_idx] = src[src_idx]; } -Broadcast::Broadcast(CUDAPlugin::kernel::Type_t element_type, size_t dst_num_elements, size_t max_threads_per_block) +Broadcast::Broadcast(ov::nvidia_gpu::kernel::Type_t element_type, size_t dst_num_elements, size_t max_threads_per_block) : element_type_{element_type}, dst_num_elements_{dst_num_elements} { std::tie(num_blocks_, threads_per_block_) = calculateElementwiseGrid(dst_num_elements_, max_threads_per_block); } @@ -47,4 +48,5 @@ void Broadcast::default_(T t, cudaStream_t, const void*, const NumpyBroadcastMap } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/broadcast.hpp b/modules/nvidia_plugin/src/kernels/broadcast.hpp similarity index 82% rename from modules/cuda_plugin/src/kernels/broadcast.hpp rename to modules/nvidia_plugin/src/kernels/broadcast.hpp index 08177e34d..d09634aa6 100644 --- a/modules/cuda_plugin/src/kernels/broadcast.hpp +++ b/modules/nvidia_plugin/src/kernels/broadcast.hpp @@ -11,12 +11,13 @@ #include "error.hpp" #include "numpy_broadcast_mapper.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Broadcast { public: - Broadcast(CUDAPlugin::kernel::Type_t element_type, size_t dst_num_elements, size_t max_threads_per_block); + Broadcast(ov::nvidia_gpu::kernel::Type_t element_type, size_t dst_num_elements, size_t max_threads_per_block); void operator()(const cudaStream_t stream, const void* src, @@ -40,4 +41,5 @@ class Broadcast { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/clamp.cu b/modules/nvidia_plugin/src/kernels/clamp.cu similarity index 94% rename from modules/cuda_plugin/src/kernels/clamp.cu rename to modules/nvidia_plugin/src/kernels/clamp.cu index db1d9c543..3a8701a40 100644 --- a/modules/cuda_plugin/src/kernels/clamp.cu +++ b/modules/nvidia_plugin/src/kernels/clamp.cu @@ -8,7 +8,8 @@ #include "error.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { namespace cumath = CUDA::math; @@ -48,4 +49,5 @@ void Clamp::operator()(cudaStream_t stream, const void* in, void* out) const { } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/clamp.hpp b/modules/nvidia_plugin/src/kernels/clamp.hpp similarity index 89% rename from modules/cuda_plugin/src/kernels/clamp.hpp rename to modules/nvidia_plugin/src/kernels/clamp.hpp index 2b90e7959..b1d8b9aed 100644 --- a/modules/cuda_plugin/src/kernels/clamp.hpp +++ b/modules/nvidia_plugin/src/kernels/clamp.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_unary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -31,4 +32,5 @@ class Clamp { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/comparison.cu b/modules/nvidia_plugin/src/kernels/comparison.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/comparison.cu rename to modules/nvidia_plugin/src/kernels/comparison.cu index 1ada3129e..bbfd9a67f 100644 --- a/modules/cuda_plugin/src/kernels/comparison.cu +++ b/modules/nvidia_plugin/src/kernels/comparison.cu @@ -8,7 +8,8 @@ #include "comparison.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -159,4 +160,5 @@ void Comparison::Call(const cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/comparison.hpp b/modules/nvidia_plugin/src/kernels/comparison.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/comparison.hpp rename to modules/nvidia_plugin/src/kernels/comparison.hpp index 2c0e4c8eb..f7bc9a90d 100644 --- a/modules/cuda_plugin/src/kernels/comparison.hpp +++ b/modules/nvidia_plugin/src/kernels/comparison.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Comparison { @@ -53,4 +54,5 @@ class Comparison { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/concat.cu b/modules/nvidia_plugin/src/kernels/concat.cu similarity index 97% rename from modules/cuda_plugin/src/kernels/concat.cu rename to modules/nvidia_plugin/src/kernels/concat.cu index 93cd117d0..4e7081ef3 100644 --- a/modules/cuda_plugin/src/kernels/concat.cu +++ b/modules/nvidia_plugin/src/kernels/concat.cu @@ -9,7 +9,8 @@ #include "concat.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -91,4 +92,5 @@ void Concat::Call(const cudaStream_t stream, const void* chunks, const void* con } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/concat.hpp b/modules/nvidia_plugin/src/kernels/concat.hpp similarity index 94% rename from modules/cuda_plugin/src/kernels/concat.hpp rename to modules/nvidia_plugin/src/kernels/concat.hpp index 17c2d0dc9..5b69d9aca 100644 --- a/modules/cuda_plugin/src/kernels/concat.hpp +++ b/modules/nvidia_plugin/src/kernels/concat.hpp @@ -9,7 +9,8 @@ #include "cuda_type_traits.hpp" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Concat { @@ -49,4 +50,5 @@ class Concat { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert.cu b/modules/nvidia_plugin/src/kernels/convert.cu similarity index 92% rename from modules/cuda_plugin/src/kernels/convert.cu rename to modules/nvidia_plugin/src/kernels/convert.cu index 7891a774f..424cb04b5 100644 --- a/modules/cuda_plugin/src/kernels/convert.cu +++ b/modules/nvidia_plugin/src/kernels/convert.cu @@ -7,7 +7,8 @@ #include "error.hpp" #include "typed_functor.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -42,7 +43,7 @@ struct ConvertFunctor<<>>( + ov::nvidia_gpu::kernel::convert_impl<<>>( size, static_cast(output), static_cast(input)); } }; @@ -59,4 +60,5 @@ void Convert::operator()(cudaStream_t stream, void* output, const void* src) con } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert.cuh b/modules/nvidia_plugin/src/kernels/convert.cuh similarity index 94% rename from modules/cuda_plugin/src/kernels/convert.cuh rename to modules/nvidia_plugin/src/kernels/convert.cuh index 3cf9d5860..2139a4eba 100644 --- a/modules/cuda_plugin/src/kernels/convert.cuh +++ b/modules/nvidia_plugin/src/kernels/convert.cuh @@ -8,7 +8,8 @@ #include "cuda_type_traits.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { #ifdef CUDA_HAS_BF16_TYPE @@ -42,4 +43,5 @@ __device__ typename std::enable_if::value || std: } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert.hpp b/modules/nvidia_plugin/src/kernels/convert.hpp similarity index 89% rename from modules/cuda_plugin/src/kernels/convert.hpp rename to modules/nvidia_plugin/src/kernels/convert.hpp index e973fe407..1684fe1f1 100644 --- a/modules/cuda_plugin/src/kernels/convert.hpp +++ b/modules/nvidia_plugin/src/kernels/convert.hpp @@ -6,7 +6,8 @@ #include "cuda_type_traits.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Convert { @@ -27,4 +28,5 @@ class Convert { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert_color.hpp b/modules/nvidia_plugin/src/kernels/convert_color.hpp similarity index 92% rename from modules/cuda_plugin/src/kernels/convert_color.hpp rename to modules/nvidia_plugin/src/kernels/convert_color.hpp index 1c3dfedee..9c4d44725 100644 --- a/modules/cuda_plugin/src/kernels/convert_color.hpp +++ b/modules/nvidia_plugin/src/kernels/convert_color.hpp @@ -10,7 +10,8 @@ #endif #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { enum class ColorConversion { RGB, BGR }; @@ -37,4 +38,5 @@ __device__ void yuv_pixel_to_rgb(const float y_val, const float u_val, const flo #endif } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert_color_i420.cu b/modules/nvidia_plugin/src/kernels/convert_color_i420.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/convert_color_i420.cu rename to modules/nvidia_plugin/src/kernels/convert_color_i420.cu index b34960555..744674e28 100644 --- a/modules/cuda_plugin/src/kernels/convert_color_i420.cu +++ b/modules/nvidia_plugin/src/kernels/convert_color_i420.cu @@ -12,7 +12,8 @@ #include "error.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -134,4 +135,5 @@ template class I420ColorConvert; template class I420ColorConvert; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert_color_i420.hpp b/modules/nvidia_plugin/src/kernels/convert_color_i420.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/convert_color_i420.hpp rename to modules/nvidia_plugin/src/kernels/convert_color_i420.hpp index 13736d549..c67c83f5e 100644 --- a/modules/cuda_plugin/src/kernels/convert_color_i420.hpp +++ b/modules/nvidia_plugin/src/kernels/convert_color_i420.hpp @@ -10,7 +10,8 @@ #include "cuda_type_traits.hpp" #include "elementtypeswitch.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -57,4 +58,5 @@ class I420ColorConvert { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert_color_nv12.cu b/modules/nvidia_plugin/src/kernels/convert_color_nv12.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/convert_color_nv12.cu rename to modules/nvidia_plugin/src/kernels/convert_color_nv12.cu index 9e308813a..193a2e63b 100644 --- a/modules/cuda_plugin/src/kernels/convert_color_nv12.cu +++ b/modules/nvidia_plugin/src/kernels/convert_color_nv12.cu @@ -12,7 +12,8 @@ #include "error.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -131,4 +132,5 @@ template class NV12ColorConvert; template class NV12ColorConvert; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/convert_color_nv12.hpp b/modules/nvidia_plugin/src/kernels/convert_color_nv12.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/convert_color_nv12.hpp rename to modules/nvidia_plugin/src/kernels/convert_color_nv12.hpp index 3ec424962..2359c0d1f 100644 --- a/modules/cuda_plugin/src/kernels/convert_color_nv12.hpp +++ b/modules/nvidia_plugin/src/kernels/convert_color_nv12.hpp @@ -10,7 +10,8 @@ #include "cuda_type_traits.hpp" #include "elementtypeswitch.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -57,4 +58,5 @@ class NV12ColorConvert { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/cuda_type_traits.hpp b/modules/nvidia_plugin/src/kernels/cuda_type_traits.hpp similarity index 96% rename from modules/cuda_plugin/src/kernels/cuda_type_traits.hpp rename to modules/nvidia_plugin/src/kernels/cuda_type_traits.hpp index 18c93b39b..c9877b122 100644 --- a/modules/cuda_plugin/src/kernels/cuda_type_traits.hpp +++ b/modules/nvidia_plugin/src/kernels/cuda_type_traits.hpp @@ -7,7 +7,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { enum class Type_t : int { @@ -127,4 +128,5 @@ struct cuda_type_traits { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/detection_output.cu b/modules/nvidia_plugin/src/kernels/detection_output.cu similarity index 99% rename from modules/cuda_plugin/src/kernels/detection_output.cu rename to modules/nvidia_plugin/src/kernels/detection_output.cu index 8f47e3fb0..6aa2ac51a 100644 --- a/modules/cuda_plugin/src/kernels/detection_output.cu +++ b/modules/nvidia_plugin/src/kernels/detection_output.cu @@ -17,7 +17,8 @@ #include "detection_output.hpp" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { namespace cumath = CUDA::math; @@ -1222,4 +1223,5 @@ void DetectionOutput::call(const CUDA::Stream& stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/detection_output.hpp b/modules/nvidia_plugin/src/kernels/detection_output.hpp similarity index 97% rename from modules/cuda_plugin/src/kernels/detection_output.hpp rename to modules/nvidia_plugin/src/kernels/detection_output.hpp index 3b07e950f..d0a4f1424 100644 --- a/modules/cuda_plugin/src/kernels/detection_output.hpp +++ b/modules/nvidia_plugin/src/kernels/detection_output.hpp @@ -13,7 +13,8 @@ #include "cuda_type_traits.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -130,4 +131,5 @@ class DetectionOutput { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/divide.cu b/modules/nvidia_plugin/src/kernels/divide.cu similarity index 97% rename from modules/cuda_plugin/src/kernels/divide.cu rename to modules/nvidia_plugin/src/kernels/divide.cu index 801b0f044..d31e8f9bb 100644 --- a/modules/cuda_plugin/src/kernels/divide.cu +++ b/modules/nvidia_plugin/src/kernels/divide.cu @@ -8,7 +8,8 @@ #include "divide.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { namespace { @@ -87,4 +88,5 @@ void PythonDivide::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/divide.hpp b/modules/nvidia_plugin/src/kernels/divide.hpp similarity index 94% rename from modules/cuda_plugin/src/kernels/divide.hpp rename to modules/nvidia_plugin/src/kernels/divide.hpp index 63e7d80e4..8b07bfee8 100644 --- a/modules/cuda_plugin/src/kernels/divide.hpp +++ b/modules/nvidia_plugin/src/kernels/divide.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -55,4 +56,5 @@ class PythonDivide { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/elementtypeswitch.hpp b/modules/nvidia_plugin/src/kernels/elementtypeswitch.hpp similarity index 96% rename from modules/cuda_plugin/src/kernels/elementtypeswitch.hpp rename to modules/nvidia_plugin/src/kernels/elementtypeswitch.hpp index c046dcc70..2553a4e9a 100644 --- a/modules/cuda_plugin/src/kernels/elementtypeswitch.hpp +++ b/modules/nvidia_plugin/src/kernels/elementtypeswitch.hpp @@ -9,7 +9,8 @@ #include "cuda_type_traits.hpp" #include "switch.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -51,4 +52,5 @@ using AllElementTypesSwitch = ElementTypesSwitch; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/elementwise_binary.cuh b/modules/nvidia_plugin/src/kernels/elementwise_binary.cuh similarity index 98% rename from modules/cuda_plugin/src/kernels/elementwise_binary.cuh rename to modules/nvidia_plugin/src/kernels/elementwise_binary.cuh index b9078c66f..4095232a8 100644 --- a/modules/cuda_plugin/src/kernels/elementwise_binary.cuh +++ b/modules/nvidia_plugin/src/kernels/elementwise_binary.cuh @@ -16,7 +16,8 @@ #include "numpy_broadcast_mapper.cuh" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { #ifdef __CUDACC__ @@ -140,4 +141,5 @@ private: }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/elementwise_unary.cuh b/modules/nvidia_plugin/src/kernels/elementwise_unary.cuh similarity index 96% rename from modules/cuda_plugin/src/kernels/elementwise_unary.cuh rename to modules/nvidia_plugin/src/kernels/elementwise_unary.cuh index 565408d4b..3a2c37142 100644 --- a/modules/cuda_plugin/src/kernels/elementwise_unary.cuh +++ b/modules/nvidia_plugin/src/kernels/elementwise_unary.cuh @@ -18,7 +18,8 @@ #include "cuda/math.cuh" #endif // __CUDACC__ -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { #ifdef __CUDACC__ @@ -75,4 +76,5 @@ private: }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/eltwise.cuh b/modules/nvidia_plugin/src/kernels/eltwise.cuh similarity index 97% rename from modules/cuda_plugin/src/kernels/eltwise.cuh rename to modules/nvidia_plugin/src/kernels/eltwise.cuh index fecc8820b..bd3eb8267 100644 --- a/modules/cuda_plugin/src/kernels/eltwise.cuh +++ b/modules/nvidia_plugin/src/kernels/eltwise.cuh @@ -9,7 +9,8 @@ #include #endif -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace eltwise { @@ -129,4 +130,5 @@ __device__ int index_in_dim<5>(int dim, const std::size_t shape[5], unsigned ele #endif } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/error.cpp b/modules/nvidia_plugin/src/kernels/error.cpp similarity index 92% rename from modules/cuda_plugin/src/kernels/error.cpp rename to modules/nvidia_plugin/src/kernels/error.cpp index 6e3d24df2..ee45c40f9 100644 --- a/modules/cuda_plugin/src/kernels/error.cpp +++ b/modules/nvidia_plugin/src/kernels/error.cpp @@ -8,7 +8,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Error : public std::exception { @@ -34,4 +35,5 @@ class Error : public std::exception { } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/error.hpp b/modules/nvidia_plugin/src/kernels/error.hpp similarity index 92% rename from modules/cuda_plugin/src/kernels/error.hpp rename to modules/nvidia_plugin/src/kernels/error.hpp index 31fe1a6ba..5e46c3707 100644 --- a/modules/cuda_plugin/src/kernels/error.hpp +++ b/modules/nvidia_plugin/src/kernels/error.hpp @@ -22,7 +22,8 @@ struct source_location { #endif #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { [[gnu::cold]] void throwIfError( cudaError_t err, @@ -33,4 +34,5 @@ namespace kernel { const std::experimental::source_location& location = std::experimental::source_location::current()); } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/fake_quantize.cu b/modules/nvidia_plugin/src/kernels/fake_quantize.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/fake_quantize.cu rename to modules/nvidia_plugin/src/kernels/fake_quantize.cu index b55316fc8..884d0ceb0 100644 --- a/modules/cuda_plugin/src/kernels/fake_quantize.cu +++ b/modules/nvidia_plugin/src/kernels/fake_quantize.cu @@ -11,7 +11,8 @@ #include "fake_quantize.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -156,4 +157,5 @@ void FakeQuantize::Call(const cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/fake_quantize.hpp b/modules/nvidia_plugin/src/kernels/fake_quantize.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/fake_quantize.hpp rename to modules/nvidia_plugin/src/kernels/fake_quantize.hpp index de3eebe8f..5c82f7bd4 100644 --- a/modules/cuda_plugin/src/kernels/fake_quantize.hpp +++ b/modules/nvidia_plugin/src/kernels/fake_quantize.hpp @@ -9,7 +9,8 @@ #include "cuda_type_traits.hpp" #include "numpy_broadcast_mapper.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class FakeQuantize { @@ -53,4 +54,5 @@ class FakeQuantize { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/floor.cu b/modules/nvidia_plugin/src/kernels/floor.cu similarity index 86% rename from modules/cuda_plugin/src/kernels/floor.cu rename to modules/nvidia_plugin/src/kernels/floor.cu index 063060b42..d93a3a7ec 100644 --- a/modules/cuda_plugin/src/kernels/floor.cu +++ b/modules/nvidia_plugin/src/kernels/floor.cu @@ -6,7 +6,8 @@ #include "floor.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -20,4 +21,5 @@ Floor::Floor(Type_t element_type, size_t max_threads_per_block, size_t num_eleme void Floor::operator()(cudaStream_t stream, const void* in, void* out) const { ewu_(stream, in, out); } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/floor.hpp b/modules/nvidia_plugin/src/kernels/floor.hpp similarity index 92% rename from modules/cuda_plugin/src/kernels/floor.hpp rename to modules/nvidia_plugin/src/kernels/floor.hpp index 1a5794901..79d53f7fd 100644 --- a/modules/cuda_plugin/src/kernels/floor.hpp +++ b/modules/nvidia_plugin/src/kernels/floor.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_unary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -35,4 +36,5 @@ class Floor { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/floor_mod.cu b/modules/nvidia_plugin/src/kernels/floor_mod.cu similarity index 95% rename from modules/cuda_plugin/src/kernels/floor_mod.cu rename to modules/nvidia_plugin/src/kernels/floor_mod.cu index 7c0b9cd7e..e1b990c3b 100644 --- a/modules/cuda_plugin/src/kernels/floor_mod.cu +++ b/modules/nvidia_plugin/src/kernels/floor_mod.cu @@ -8,7 +8,8 @@ #include "floor_mod.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { namespace { @@ -59,4 +60,5 @@ void FloorMod::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/floor_mod.hpp b/modules/nvidia_plugin/src/kernels/floor_mod.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/floor_mod.hpp rename to modules/nvidia_plugin/src/kernels/floor_mod.hpp index 49c560ad1..3d9f179f2 100644 --- a/modules/cuda_plugin/src/kernels/floor_mod.hpp +++ b/modules/nvidia_plugin/src/kernels/floor_mod.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -33,4 +34,5 @@ class FloorMod { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/gather.cu b/modules/nvidia_plugin/src/kernels/gather.cu similarity index 99% rename from modules/cuda_plugin/src/kernels/gather.cu rename to modules/nvidia_plugin/src/kernels/gather.cu index a0b487368..001f7c0dc 100644 --- a/modules/cuda_plugin/src/kernels/gather.cu +++ b/modules/nvidia_plugin/src/kernels/gather.cu @@ -9,7 +9,8 @@ #include "gather.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { @@ -261,4 +262,5 @@ void Gather::Call(const cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/gather.hpp b/modules/nvidia_plugin/src/kernels/gather.hpp similarity index 96% rename from modules/cuda_plugin/src/kernels/gather.hpp rename to modules/nvidia_plugin/src/kernels/gather.hpp index 0e92668bf..c023f2c83 100644 --- a/modules/cuda_plugin/src/kernels/gather.hpp +++ b/modules/nvidia_plugin/src/kernels/gather.hpp @@ -9,7 +9,8 @@ #include "cuda_type_traits.hpp" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Gather { @@ -71,4 +72,5 @@ class Gather { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/insert.cu b/modules/nvidia_plugin/src/kernels/insert.cu similarity index 97% rename from modules/cuda_plugin/src/kernels/insert.cu rename to modules/nvidia_plugin/src/kernels/insert.cu index 359a76c0f..83a8594a2 100644 --- a/modules/cuda_plugin/src/kernels/insert.cu +++ b/modules/nvidia_plugin/src/kernels/insert.cu @@ -10,7 +10,8 @@ #include "insert.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -80,4 +81,5 @@ void Insert::call(const cudaStream_t stream, const void* src, void* dst, const s } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/insert.hpp b/modules/nvidia_plugin/src/kernels/insert.hpp similarity index 94% rename from modules/cuda_plugin/src/kernels/insert.hpp rename to modules/nvidia_plugin/src/kernels/insert.hpp index 3b74e34ff..fc96bb115 100644 --- a/modules/cuda_plugin/src/kernels/insert.hpp +++ b/modules/nvidia_plugin/src/kernels/insert.hpp @@ -10,7 +10,8 @@ #include "error.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Insert { @@ -51,4 +52,5 @@ inline void Insert::setImmutableWorkbuffer(void* immutableBuffer) { } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_base.hpp b/modules/nvidia_plugin/src/kernels/interpolate_base.hpp similarity index 88% rename from modules/cuda_plugin/src/kernels/interpolate_base.hpp rename to modules/nvidia_plugin/src/kernels/interpolate_base.hpp index b4054ac32..23b338e0e 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_base.hpp +++ b/modules/nvidia_plugin/src/kernels/interpolate_base.hpp @@ -6,7 +6,8 @@ #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class InterpolateBase { @@ -31,4 +32,5 @@ class InterpolateBase { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_cubic.cu b/modules/nvidia_plugin/src/kernels/interpolate_cubic.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/interpolate_cubic.cu rename to modules/nvidia_plugin/src/kernels/interpolate_cubic.cu index 3057f1e94..b4662a490 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_cubic.cu +++ b/modules/nvidia_plugin/src/kernels/interpolate_cubic.cu @@ -12,7 +12,8 @@ #include "interpolate_cubic.hpp" #include "interpolate_details.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -170,4 +171,5 @@ void InterpolateCubic::initImmutableWorkbuffers(const std::vector& buffer } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_cubic.hpp b/modules/nvidia_plugin/src/kernels/interpolate_cubic.hpp similarity index 94% rename from modules/cuda_plugin/src/kernels/interpolate_cubic.hpp rename to modules/nvidia_plugin/src/kernels/interpolate_cubic.hpp index e6c255516..899dddba8 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_cubic.hpp +++ b/modules/nvidia_plugin/src/kernels/interpolate_cubic.hpp @@ -11,7 +11,8 @@ #include "interpolate_base.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class InterpolateCubic : public InterpolateBase { @@ -58,4 +59,5 @@ class InterpolateCubic : public InterpolateBase { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_details.cuh b/modules/nvidia_plugin/src/kernels/interpolate_details.cuh similarity index 97% rename from modules/cuda_plugin/src/kernels/interpolate_details.cuh rename to modules/nvidia_plugin/src/kernels/interpolate_details.cuh index 2cd026827..34729d1f8 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_details.cuh +++ b/modules/nvidia_plugin/src/kernels/interpolate_details.cuh @@ -11,7 +11,8 @@ #include "convert.cuh" #include "interpolate_base.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class InterpolateBase::details { @@ -84,4 +85,5 @@ public: }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_linear.cu b/modules/nvidia_plugin/src/kernels/interpolate_linear.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/interpolate_linear.cu rename to modules/nvidia_plugin/src/kernels/interpolate_linear.cu index 3a83d1cac..6f402de46 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_linear.cu +++ b/modules/nvidia_plugin/src/kernels/interpolate_linear.cu @@ -13,7 +13,8 @@ #include "interpolate_details.cuh" #include "interpolate_linear.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -210,4 +211,5 @@ void InterpolateLinear::initImmutableWorkbuffers(const std::vector& buffe } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_linear.hpp b/modules/nvidia_plugin/src/kernels/interpolate_linear.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/interpolate_linear.hpp rename to modules/nvidia_plugin/src/kernels/interpolate_linear.hpp index 4737a369b..a5e1b96e9 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_linear.hpp +++ b/modules/nvidia_plugin/src/kernels/interpolate_linear.hpp @@ -11,7 +11,8 @@ #include "interpolate_base.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class InterpolateLinear : public InterpolateBase { @@ -60,4 +61,5 @@ class InterpolateLinear : public InterpolateBase { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_nearest.cu b/modules/nvidia_plugin/src/kernels/interpolate_nearest.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/interpolate_nearest.cu rename to modules/nvidia_plugin/src/kernels/interpolate_nearest.cu index 42076ea49..620c9c353 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_nearest.cu +++ b/modules/nvidia_plugin/src/kernels/interpolate_nearest.cu @@ -10,7 +10,8 @@ #include "interpolate_details.cuh" #include "interpolate_nearest.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { static inline __device__ float calc_output_index(const InterpolateNearest::CoordinateTransformMode mode, @@ -184,7 +185,7 @@ static __global__ void upscale_interpolate(const InterpolateNearest::NearestMode InterpolateNearest::InterpolateNearest(size_t num_blocks, size_t threads_per_block, - CUDAPlugin::kernel::Type_t element_type, + ov::nvidia_gpu::kernel::Type_t element_type, bool use_optimized_kernel, NearestMode nearest_mode, CoordinateTransformMode transform_mode) @@ -260,4 +261,5 @@ void InterpolateNearest::callKernel(const cudaStream_t stream, } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/interpolate_nearest.hpp b/modules/nvidia_plugin/src/kernels/interpolate_nearest.hpp similarity index 91% rename from modules/cuda_plugin/src/kernels/interpolate_nearest.hpp rename to modules/nvidia_plugin/src/kernels/interpolate_nearest.hpp index ac02ade4f..22c36e9c3 100644 --- a/modules/cuda_plugin/src/kernels/interpolate_nearest.hpp +++ b/modules/nvidia_plugin/src/kernels/interpolate_nearest.hpp @@ -10,7 +10,8 @@ #include "error.hpp" #include "interpolate_base.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class InterpolateNearest : public InterpolateBase { @@ -20,7 +21,7 @@ class InterpolateNearest : public InterpolateBase { InterpolateNearest(size_t num_blocks, size_t threads_per_block, - CUDAPlugin::kernel::Type_t element_type, + ov::nvidia_gpu::kernel::Type_t element_type, bool upscale, NearestMode nearest_mode, CoordinateTransformMode transform_mode); @@ -55,4 +56,5 @@ class InterpolateNearest : public InterpolateBase { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/logical_not.cu b/modules/nvidia_plugin/src/kernels/logical_not.cu similarity index 95% rename from modules/cuda_plugin/src/kernels/logical_not.cu rename to modules/nvidia_plugin/src/kernels/logical_not.cu index 4008a4c10..f2d79b5be 100644 --- a/modules/cuda_plugin/src/kernels/logical_not.cu +++ b/modules/nvidia_plugin/src/kernels/logical_not.cu @@ -8,7 +8,8 @@ #include "logical_not.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -51,4 +52,5 @@ void LogicalNot::operator()(cudaStream_t stream, const bool* src, bool* dst) con } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/logical_not.cuh b/modules/nvidia_plugin/src/kernels/logical_not.cuh similarity index 88% rename from modules/cuda_plugin/src/kernels/logical_not.cuh rename to modules/nvidia_plugin/src/kernels/logical_not.cuh index 8d951a4d6..9c62e9c83 100644 --- a/modules/cuda_plugin/src/kernels/logical_not.cuh +++ b/modules/nvidia_plugin/src/kernels/logical_not.cuh @@ -9,7 +9,8 @@ #include "eltwise.cuh" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class LogicalNot { @@ -28,4 +29,5 @@ private: }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/maximum.cu b/modules/nvidia_plugin/src/kernels/maximum.cu similarity index 90% rename from modules/cuda_plugin/src/kernels/maximum.cu rename to modules/nvidia_plugin/src/kernels/maximum.cu index 06e76bc5f..83aec3062 100644 --- a/modules/cuda_plugin/src/kernels/maximum.cu +++ b/modules/nvidia_plugin/src/kernels/maximum.cu @@ -6,7 +6,8 @@ #include "maximum.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -27,4 +28,5 @@ void Maximum::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/maximum.hpp b/modules/nvidia_plugin/src/kernels/maximum.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/maximum.hpp rename to modules/nvidia_plugin/src/kernels/maximum.hpp index 66d98cca0..71d1eb2d4 100644 --- a/modules/cuda_plugin/src/kernels/maximum.hpp +++ b/modules/nvidia_plugin/src/kernels/maximum.hpp @@ -6,7 +6,8 @@ #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -32,4 +33,5 @@ class Maximum { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/minimum.cu b/modules/nvidia_plugin/src/kernels/minimum.cu similarity index 90% rename from modules/cuda_plugin/src/kernels/minimum.cu rename to modules/nvidia_plugin/src/kernels/minimum.cu index eb7ea6828..a2715e0a4 100644 --- a/modules/cuda_plugin/src/kernels/minimum.cu +++ b/modules/nvidia_plugin/src/kernels/minimum.cu @@ -6,7 +6,8 @@ #include "minimum.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -27,4 +28,5 @@ void Minimum::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/minimum.hpp b/modules/nvidia_plugin/src/kernels/minimum.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/minimum.hpp rename to modules/nvidia_plugin/src/kernels/minimum.hpp index fe82a6ed1..46e8ab4d2 100644 --- a/modules/cuda_plugin/src/kernels/minimum.hpp +++ b/modules/nvidia_plugin/src/kernels/minimum.hpp @@ -6,7 +6,8 @@ #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -32,4 +33,5 @@ class Minimum { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/mod.cu b/modules/nvidia_plugin/src/kernels/mod.cu similarity index 94% rename from modules/cuda_plugin/src/kernels/mod.cu rename to modules/nvidia_plugin/src/kernels/mod.cu index d95d18771..6e268556d 100644 --- a/modules/cuda_plugin/src/kernels/mod.cu +++ b/modules/nvidia_plugin/src/kernels/mod.cu @@ -8,7 +8,8 @@ #include "mod.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { namespace { @@ -47,4 +48,5 @@ void Mod::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/mod.hpp b/modules/nvidia_plugin/src/kernels/mod.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/mod.hpp rename to modules/nvidia_plugin/src/kernels/mod.hpp index daa588507..9e5a589b0 100644 --- a/modules/cuda_plugin/src/kernels/mod.hpp +++ b/modules/nvidia_plugin/src/kernels/mod.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -33,4 +34,5 @@ class Mod { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/multiply.cu b/modules/nvidia_plugin/src/kernels/multiply.cu similarity index 90% rename from modules/cuda_plugin/src/kernels/multiply.cu rename to modules/nvidia_plugin/src/kernels/multiply.cu index 69f4bbcca..991072d8b 100644 --- a/modules/cuda_plugin/src/kernels/multiply.cu +++ b/modules/nvidia_plugin/src/kernels/multiply.cu @@ -6,7 +6,8 @@ #include "multiply.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -27,4 +28,5 @@ void Multiply::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/multiply.hpp b/modules/nvidia_plugin/src/kernels/multiply.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/multiply.hpp rename to modules/nvidia_plugin/src/kernels/multiply.hpp index 16c65c27f..39d7ddf20 100644 --- a/modules/cuda_plugin/src/kernels/multiply.hpp +++ b/modules/nvidia_plugin/src/kernels/multiply.hpp @@ -6,7 +6,8 @@ #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -32,4 +33,5 @@ class Multiply { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/numpy_broadcast_mapper.cuh b/modules/nvidia_plugin/src/kernels/numpy_broadcast_mapper.cuh similarity index 96% rename from modules/cuda_plugin/src/kernels/numpy_broadcast_mapper.cuh rename to modules/nvidia_plugin/src/kernels/numpy_broadcast_mapper.cuh index c4a7b99d4..4a77783e0 100644 --- a/modules/cuda_plugin/src/kernels/numpy_broadcast_mapper.cuh +++ b/modules/nvidia_plugin/src/kernels/numpy_broadcast_mapper.cuh @@ -9,7 +9,8 @@ #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class NumpyBroadcastMapper { @@ -64,4 +65,5 @@ private: }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/pad.cu b/modules/nvidia_plugin/src/kernels/pad.cu similarity index 99% rename from modules/cuda_plugin/src/kernels/pad.cu rename to modules/nvidia_plugin/src/kernels/pad.cu index b83bdd272..7a802c342 100644 --- a/modules/cuda_plugin/src/kernels/pad.cu +++ b/modules/nvidia_plugin/src/kernels/pad.cu @@ -9,7 +9,8 @@ #include "error.hpp" #include "pad.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { // TODO: Would be optimized adding template specializations. Left without this optimization in sake of readability. @@ -217,4 +218,5 @@ void ConstModePad::callNCHWFormatConvKernel(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/pad.cuh b/modules/nvidia_plugin/src/kernels/pad.cuh similarity index 96% rename from modules/cuda_plugin/src/kernels/pad.cuh rename to modules/nvidia_plugin/src/kernels/pad.cuh index 7221bbe05..382b3e42f 100644 --- a/modules/cuda_plugin/src/kernels/pad.cuh +++ b/modules/nvidia_plugin/src/kernels/pad.cuh @@ -8,7 +8,8 @@ #include "eltwise.cuh" #include "ngraph/type/element_type.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class ConstModePad { @@ -70,4 +71,5 @@ private: }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/power.cu b/modules/nvidia_plugin/src/kernels/power.cu similarity index 92% rename from modules/cuda_plugin/src/kernels/power.cu rename to modules/nvidia_plugin/src/kernels/power.cu index e0ed9b6da..74ba4f9b3 100644 --- a/modules/cuda_plugin/src/kernels/power.cu +++ b/modules/nvidia_plugin/src/kernels/power.cu @@ -5,7 +5,8 @@ #include "convert.cuh" #include "power.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -33,4 +34,5 @@ void Power::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/power.hpp b/modules/nvidia_plugin/src/kernels/power.hpp similarity index 92% rename from modules/cuda_plugin/src/kernels/power.hpp rename to modules/nvidia_plugin/src/kernels/power.hpp index c1ef5fa31..2aa9deb31 100644 --- a/modules/cuda_plugin/src/kernels/power.hpp +++ b/modules/nvidia_plugin/src/kernels/power.hpp @@ -6,7 +6,8 @@ #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -47,4 +48,5 @@ class Power { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/prelu.cu b/modules/nvidia_plugin/src/kernels/prelu.cu similarity index 89% rename from modules/cuda_plugin/src/kernels/prelu.cu rename to modules/nvidia_plugin/src/kernels/prelu.cu index 3be8ba1b1..f28afe6ef 100644 --- a/modules/cuda_plugin/src/kernels/prelu.cu +++ b/modules/nvidia_plugin/src/kernels/prelu.cu @@ -1,6 +1,7 @@ #include "prelu.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -21,4 +22,5 @@ void PRelu::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/prelu.hpp b/modules/nvidia_plugin/src/kernels/prelu.hpp similarity index 91% rename from modules/cuda_plugin/src/kernels/prelu.hpp rename to modules/nvidia_plugin/src/kernels/prelu.hpp index 2450bffbc..d77743321 100644 --- a/modules/cuda_plugin/src/kernels/prelu.hpp +++ b/modules/nvidia_plugin/src/kernels/prelu.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -40,4 +41,5 @@ class PRelu { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/range.cu b/modules/nvidia_plugin/src/kernels/range.cu similarity index 97% rename from modules/cuda_plugin/src/kernels/range.cu rename to modules/nvidia_plugin/src/kernels/range.cu index 86ff5a4ff..8282c3c84 100644 --- a/modules/cuda_plugin/src/kernels/range.cu +++ b/modules/nvidia_plugin/src/kernels/range.cu @@ -8,7 +8,8 @@ #include "kernels/range.hpp" #include "typed_functor.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { @@ -76,4 +77,5 @@ void RangeKernelOp::operator()( } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/range.hpp b/modules/nvidia_plugin/src/kernels/range.hpp similarity index 91% rename from modules/cuda_plugin/src/kernels/range.hpp rename to modules/nvidia_plugin/src/kernels/range.hpp index 051a2202d..9ed6edc8e 100644 --- a/modules/cuda_plugin/src/kernels/range.hpp +++ b/modules/nvidia_plugin/src/kernels/range.hpp @@ -9,7 +9,8 @@ #include "cuda_type_traits.hpp" #include "ngraph/type/element_type.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class RangeKernelOp { @@ -33,4 +34,5 @@ class RangeKernelOp { } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/round.cu b/modules/nvidia_plugin/src/kernels/round.cu similarity index 86% rename from modules/cuda_plugin/src/kernels/round.cu rename to modules/nvidia_plugin/src/kernels/round.cu index a5c3c0c8c..f141926c0 100644 --- a/modules/cuda_plugin/src/kernels/round.cu +++ b/modules/nvidia_plugin/src/kernels/round.cu @@ -6,7 +6,8 @@ #include "round.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -20,4 +21,5 @@ Round::Round(Type_t element_type, size_t max_threads_per_block, size_t num_eleme void Round::operator()(cudaStream_t stream, const void* in, void* out) const { ewu_(stream, in, out); } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/round.hpp b/modules/nvidia_plugin/src/kernels/round.hpp similarity index 92% rename from modules/cuda_plugin/src/kernels/round.hpp rename to modules/nvidia_plugin/src/kernels/round.hpp index afd3e5c91..bf2e70f2e 100644 --- a/modules/cuda_plugin/src/kernels/round.hpp +++ b/modules/nvidia_plugin/src/kernels/round.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_unary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -35,4 +36,5 @@ class Round { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/scatter_nd_update.cu b/modules/nvidia_plugin/src/kernels/scatter_nd_update.cu similarity index 99% rename from modules/cuda_plugin/src/kernels/scatter_nd_update.cu rename to modules/nvidia_plugin/src/kernels/scatter_nd_update.cu index d68947c40..57cf73f51 100644 --- a/modules/cuda_plugin/src/kernels/scatter_nd_update.cu +++ b/modules/nvidia_plugin/src/kernels/scatter_nd_update.cu @@ -11,7 +11,8 @@ #include "scatter_nd_update.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -190,4 +191,5 @@ void ScatterNDUpdate::Call(const cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/scatter_nd_update.hpp b/modules/nvidia_plugin/src/kernels/scatter_nd_update.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/scatter_nd_update.hpp rename to modules/nvidia_plugin/src/kernels/scatter_nd_update.hpp index c0584ddd6..5afd82a0b 100644 --- a/modules/cuda_plugin/src/kernels/scatter_nd_update.hpp +++ b/modules/nvidia_plugin/src/kernels/scatter_nd_update.hpp @@ -9,7 +9,8 @@ #include "cuda_type_traits.hpp" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class ScatterNDUpdate { @@ -60,4 +61,5 @@ class ScatterNDUpdate { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/select.cu b/modules/nvidia_plugin/src/kernels/select.cu similarity index 98% rename from modules/cuda_plugin/src/kernels/select.cu rename to modules/nvidia_plugin/src/kernels/select.cu index cf64506b7..0483e495c 100644 --- a/modules/cuda_plugin/src/kernels/select.cu +++ b/modules/nvidia_plugin/src/kernels/select.cu @@ -7,7 +7,8 @@ #include "select.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -130,4 +131,5 @@ void SelectKernelOp::callKernel(const cudaStream_t stream, } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/select.hpp b/modules/nvidia_plugin/src/kernels/select.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/select.hpp rename to modules/nvidia_plugin/src/kernels/select.hpp index 438e1cf0b..3f9390d76 100644 --- a/modules/cuda_plugin/src/kernels/select.hpp +++ b/modules/nvidia_plugin/src/kernels/select.hpp @@ -9,7 +9,8 @@ #include "error.hpp" #include "ngraph/type/element_type.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class SelectKernelOp { @@ -53,4 +54,5 @@ class SelectKernelOp { } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/slice.cu b/modules/nvidia_plugin/src/kernels/slice.cu similarity index 97% rename from modules/cuda_plugin/src/kernels/slice.cu rename to modules/nvidia_plugin/src/kernels/slice.cu index 19802df7a..70a0ee379 100644 --- a/modules/cuda_plugin/src/kernels/slice.cu +++ b/modules/nvidia_plugin/src/kernels/slice.cu @@ -10,7 +10,8 @@ #include "slice.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -81,4 +82,5 @@ void Slice::call(cudaStream_t stream, const void *src, void *dst, size_t start) } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/slice.hpp b/modules/nvidia_plugin/src/kernels/slice.hpp similarity index 94% rename from modules/cuda_plugin/src/kernels/slice.hpp rename to modules/nvidia_plugin/src/kernels/slice.hpp index 3b27144af..a32d3dcf2 100644 --- a/modules/cuda_plugin/src/kernels/slice.hpp +++ b/modules/nvidia_plugin/src/kernels/slice.hpp @@ -8,7 +8,8 @@ #include "error.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Slice { @@ -49,4 +50,5 @@ inline void Slice::setImmutableWorkbuffer(void* immutableBuffer) { } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/split.cu b/modules/nvidia_plugin/src/kernels/split.cu similarity index 97% rename from modules/cuda_plugin/src/kernels/split.cu rename to modules/nvidia_plugin/src/kernels/split.cu index c6e564d46..8a9c98429 100644 --- a/modules/cuda_plugin/src/kernels/split.cu +++ b/modules/nvidia_plugin/src/kernels/split.cu @@ -9,7 +9,8 @@ #include "split.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -85,4 +86,5 @@ void Split::Call(cudaStream_t stream, const void *src, void **dst) const { } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/split.hpp b/modules/nvidia_plugin/src/kernels/split.hpp similarity index 91% rename from modules/cuda_plugin/src/kernels/split.hpp rename to modules/nvidia_plugin/src/kernels/split.hpp index 64f3ec372..0e72966ca 100644 --- a/modules/cuda_plugin/src/kernels/split.hpp +++ b/modules/nvidia_plugin/src/kernels/split.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class Split { @@ -38,4 +39,5 @@ class Split { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/squared_difference.cu b/modules/nvidia_plugin/src/kernels/squared_difference.cu similarity index 92% rename from modules/cuda_plugin/src/kernels/squared_difference.cu rename to modules/nvidia_plugin/src/kernels/squared_difference.cu index 1273c90f6..dbda10592 100644 --- a/modules/cuda_plugin/src/kernels/squared_difference.cu +++ b/modules/nvidia_plugin/src/kernels/squared_difference.cu @@ -7,7 +7,8 @@ #include "squared_difference.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -31,4 +32,5 @@ void SquaredDifference::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/squared_difference.hpp b/modules/nvidia_plugin/src/kernels/squared_difference.hpp similarity index 91% rename from modules/cuda_plugin/src/kernels/squared_difference.hpp rename to modules/nvidia_plugin/src/kernels/squared_difference.hpp index 366c9df54..33d979068 100644 --- a/modules/cuda_plugin/src/kernels/squared_difference.hpp +++ b/modules/nvidia_plugin/src/kernels/squared_difference.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -33,4 +34,5 @@ class SquaredDifference { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/strided_slice.cu b/modules/nvidia_plugin/src/kernels/strided_slice.cu similarity index 99% rename from modules/cuda_plugin/src/kernels/strided_slice.cu rename to modules/nvidia_plugin/src/kernels/strided_slice.cu index e6406b899..659eb23dc 100644 --- a/modules/cuda_plugin/src/kernels/strided_slice.cu +++ b/modules/nvidia_plugin/src/kernels/strided_slice.cu @@ -6,7 +6,8 @@ #include "strided_slice.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { #ifdef CUDA_KERNEL_PRINT_LOG @@ -221,4 +222,5 @@ void StridedSliceKernelOp::callReverseAxesKernel(const cudaStream_t stream, void } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/strided_slice.hpp b/modules/nvidia_plugin/src/kernels/strided_slice.hpp similarity index 96% rename from modules/cuda_plugin/src/kernels/strided_slice.hpp rename to modules/nvidia_plugin/src/kernels/strided_slice.hpp index 845988424..f7b4ea35f 100644 --- a/modules/cuda_plugin/src/kernels/strided_slice.hpp +++ b/modules/nvidia_plugin/src/kernels/strided_slice.hpp @@ -12,7 +12,8 @@ #include "error.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class StridedSliceKernelOp { public: @@ -66,4 +67,5 @@ class StridedSliceKernelOp { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/subtract.cu b/modules/nvidia_plugin/src/kernels/subtract.cu similarity index 91% rename from modules/cuda_plugin/src/kernels/subtract.cu rename to modules/nvidia_plugin/src/kernels/subtract.cu index f79765fc7..017b8295b 100644 --- a/modules/cuda_plugin/src/kernels/subtract.cu +++ b/modules/nvidia_plugin/src/kernels/subtract.cu @@ -7,7 +7,8 @@ #include "subtract.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -28,4 +29,5 @@ void Subtract::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/subtract.hpp b/modules/nvidia_plugin/src/kernels/subtract.hpp similarity index 90% rename from modules/cuda_plugin/src/kernels/subtract.hpp rename to modules/nvidia_plugin/src/kernels/subtract.hpp index b50ec107f..9e1ff296a 100644 --- a/modules/cuda_plugin/src/kernels/subtract.hpp +++ b/modules/nvidia_plugin/src/kernels/subtract.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_binary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -33,4 +34,5 @@ class Subtract { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/swish.cu b/modules/nvidia_plugin/src/kernels/swish.cu similarity index 95% rename from modules/cuda_plugin/src/kernels/swish.cu rename to modules/nvidia_plugin/src/kernels/swish.cu index 4adc16ae6..0c0d320ce 100644 --- a/modules/cuda_plugin/src/kernels/swish.cu +++ b/modules/nvidia_plugin/src/kernels/swish.cu @@ -7,7 +7,8 @@ #include "swish.hpp" #include "tensor_helpers.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -55,4 +56,5 @@ Swish::Swish(Type_t element_type, size_t max_threads_per_block, size_t num_eleme void Swish::operator()(cudaStream_t stream, const void* in, void* out) const { ewu_(stream, in, out, beta_); } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/swish.hpp b/modules/nvidia_plugin/src/kernels/swish.hpp similarity index 92% rename from modules/cuda_plugin/src/kernels/swish.hpp rename to modules/nvidia_plugin/src/kernels/swish.hpp index e1d747665..17af1d11a 100644 --- a/modules/cuda_plugin/src/kernels/swish.hpp +++ b/modules/nvidia_plugin/src/kernels/swish.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementwise_unary.cuh" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -36,4 +37,5 @@ class Swish { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/switch.hpp b/modules/nvidia_plugin/src/kernels/switch.hpp similarity index 95% rename from modules/cuda_plugin/src/kernels/switch.hpp rename to modules/nvidia_plugin/src/kernels/switch.hpp index c7b236017..f9f2373bc 100644 --- a/modules/cuda_plugin/src/kernels/switch.hpp +++ b/modules/nvidia_plugin/src/kernels/switch.hpp @@ -6,7 +6,8 @@ #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -41,4 +42,5 @@ constexpr decltype(auto) templateSwitch(std::integer_sequence, TypeT v, Swi // auto n = templateSwitch(std::integer_sequence{}, 4, SimpleSwitch{}, 2); } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/tensor_helpers.hpp b/modules/nvidia_plugin/src/kernels/tensor_helpers.hpp similarity index 98% rename from modules/cuda_plugin/src/kernels/tensor_helpers.hpp rename to modules/nvidia_plugin/src/kernels/tensor_helpers.hpp index 95e3cc1ad..4cda0b80a 100644 --- a/modules/cuda_plugin/src/kernels/tensor_helpers.hpp +++ b/modules/nvidia_plugin/src/kernels/tensor_helpers.hpp @@ -10,7 +10,8 @@ #include #include -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { template @@ -148,4 +149,5 @@ std::enable_if_t::value, T> double_round_cast(double x, dou } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/topk.cu b/modules/nvidia_plugin/src/kernels/topk.cu similarity index 99% rename from modules/cuda_plugin/src/kernels/topk.cu rename to modules/nvidia_plugin/src/kernels/topk.cu index 1b4b971cb..21d488174 100644 --- a/modules/cuda_plugin/src/kernels/topk.cu +++ b/modules/nvidia_plugin/src/kernels/topk.cu @@ -12,7 +12,8 @@ #include "tensor_helpers.hpp" #include "topk.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { using TopKShape = Shape; @@ -308,4 +309,5 @@ void TopK::operator()(cudaStream_t stream, } } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/topk.hpp b/modules/nvidia_plugin/src/kernels/topk.hpp similarity index 97% rename from modules/cuda_plugin/src/kernels/topk.hpp rename to modules/nvidia_plugin/src/kernels/topk.hpp index 72c2da9ac..6ef8f51e9 100644 --- a/modules/cuda_plugin/src/kernels/topk.hpp +++ b/modules/nvidia_plugin/src/kernels/topk.hpp @@ -7,7 +7,8 @@ #include "cuda_type_traits.hpp" #include "elementtypeswitch.hpp" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { class TopK { @@ -101,4 +102,5 @@ class TopK { }; } // namespace kernel -} // namespace CUDAPlugin +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/cuda_plugin/src/kernels/typed_functor.hpp b/modules/nvidia_plugin/src/kernels/typed_functor.hpp similarity index 96% rename from modules/cuda_plugin/src/kernels/typed_functor.hpp rename to modules/nvidia_plugin/src/kernels/typed_functor.hpp index 1005b1aef..97b335681 100644 --- a/modules/cuda_plugin/src/kernels/typed_functor.hpp +++ b/modules/nvidia_plugin/src/kernels/typed_functor.hpp @@ -9,7 +9,8 @@ #include "error.hpp" #include "fmt/format.h" -namespace CUDAPlugin { +namespace ov { +namespace nvidia_gpu { namespace kernel { @@ -38,7 +39,7 @@ enum Dimension : size_t { DIM_1D = 1, DIM_2D, DIM_3D }; /// static constexpr TypedFunctor instance{}; /// And the function pointer can be accessed like the next. /// auto func_ptr = instance[type_1][type_2][type_3]; -/// Where subscription index (type_1, type_2, type_3) is of type CUDAPlugin::kernel::Type_t enum. +/// Where subscription index (type_1, type_2, type_3) is of type ov::nvidia_gpu::kernel::Type_t enum. /// /// This template can be used for any dimension number, if the Dimension enumeration extended properly. /// For trivial case with one dimension the functor will be like the next. @@ -52,7 +53,7 @@ enum Dimension : size_t { DIM_1D = 1, DIM_2D, DIM_3D }; /// The template structure can be instantiated like the next. /// static constexpr TypedFunctor instance{}; /// And the function pointer can be accessed like the next. -/// auto func_ptr = instance[CUDAPlugin::kernel::Type_t::f32]; +/// auto func_ptr = instance[ov::nvidia_gpu::kernel::Type_t::f32]; // clang-format on template