Unverified Commit a59df50d authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

Remove Hybrid GPU backend (#4269)

Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
parent 8855eb16
......@@ -123,7 +123,6 @@ option(NGRAPH_MLIR_ENABLE "Control the building of MLIR backend" FALSE)
option(NGRAPH_GPU_ENABLE "Control the building of the GPU backend" FALSE)
option(NGRAPH_INTERPRETER_ENABLE "Control the building of the INTERPRETER backend" TRUE)
option(NGRAPH_NOP_ENABLE "Control the building of the NOP backend" TRUE)
option(NGRAPH_GPUH_ENABLE "Control the building of the Hybrid GPU backend" FALSE)
option(NGRAPH_GENERIC_CPU_ENABLE "Enable build nGraph for generic CPU backend" TRUE)
option(NGRAPH_DEBUG_ENABLE "Enable output for NGRAPH_DEBUG statements" FALSE)
option(NGRAPH_DEPRECATED_ENABLE "Enable compiler deprecation pragmas for deprecated APIs (recommended only for development use)" FALSE)
......@@ -183,10 +182,6 @@ if (NGRAPH_DISTRIBUTED_ENABLE)
endif()
endif()
if (NGRAPH_GPUH_ENABLE)
set(NGRAPH_GPU_ENABLE TRUE)
endif()
if (NGRAPH_ONNX_IMPORT_ENABLE)
option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system provided Protobuf shared object" FALSE)
endif()
......@@ -220,7 +215,6 @@ NORMALIZE_BOOL(NGRAPH_MLIR_ENABLE)
NORMALIZE_BOOL(NGRAPH_GPU_ENABLE)
NORMALIZE_BOOL(NGRAPH_INTERPRETER_ENABLE)
NORMALIZE_BOOL(NGRAPH_NOP_ENABLE)
NORMALIZE_BOOL(NGRAPH_GPUH_ENABLE)
NORMALIZE_BOOL(NGRAPH_GENERIC_CPU_ENABLE)
NORMALIZE_BOOL(NGRAPH_DEBUG_ENABLE)
NORMALIZE_BOOL(NGRAPH_DEPRECATED_ENABLE)
......@@ -260,7 +254,6 @@ message(STATUS "NGRAPH_ENABLE_CPU_CONV_AUTO: ${NGRAPH_ENABLE_CPU_CONV_A
message(STATUS "NGRAPH_EXPORT_TARGETS_ENABLE: ${NGRAPH_EXPORT_TARGETS_ENABLE}")
message(STATUS "NGRAPH_GENERIC_CPU_ENABLE: ${NGRAPH_GENERIC_CPU_ENABLE}")
message(STATUS "NGRAPH_GPU_ENABLE: ${NGRAPH_GPU_ENABLE}")
message(STATUS "NGRAPH_GPUH_ENABLE: ${NGRAPH_GPUH_ENABLE}")
message(STATUS "NGRAPH_INTERPRETER_ENABLE: ${NGRAPH_INTERPRETER_ENABLE}")
message(STATUS "NGRAPH_INTERPRETER_STATIC_LIB_ENABLE: ${NGRAPH_INTERPRETER_STATIC_LIB_ENABLE}")
message(STATUS "NGRAPH_JSON_ENABLE: ${NGRAPH_JSON_ENABLE}")
......@@ -273,6 +266,7 @@ message(STATUS "NGRAPH_PLAIDML_ENABLE: ${NGRAPH_PLAIDML_ENABLE}")
message(STATUS "NGRAPH_PLAIDML_STATIC_LIB_ENABLE: ${NGRAPH_PLAIDML_STATIC_LIB_ENABLE}")
message(STATUS "NGRAPH_PYTHON_BUILD_ENABLE: ${NGRAPH_PYTHON_BUILD_ENABLE}")
message(STATUS "NGRAPH_STATIC_LIB_ENABLE: ${NGRAPH_STATIC_LIB_ENABLE}")
message(STATUS "NGRAPH_USE_LEGACY_MKLDNN: ${NGRAPH_USE_LEGACY_MKLDNN}")
if (NGRAPH_CPU_ENABLE)
message(STATUS "NGRAPH_TBB_ENABLE: ${NGRAPH_TBB_ENABLE}")
endif()
......
......@@ -31,10 +31,6 @@ if (NGRAPH_NOP_ENABLE)
add_subdirectory(nop)
endif()
if (NGRAPH_GPUH_ENABLE)
add_subdirectory(gpuh)
endif()
if (NGRAPH_GENERIC_CPU_ENABLE)
add_subdirectory(gcpu)
endif()
......
# ******************************************************************************
# Copyright 2017-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************
if (NGRAPH_GPUH_ENABLE)
add_library(gpuh_backend SHARED gpuh_backend.cpp)
if(NGRAPH_LIB_VERSIONING_ENABLE)
set_target_properties(gpuh_backend PROPERTIES
VERSION ${NGRAPH_VERSION}
SOVERSION ${NGRAPH_API_VERSION})
endif()
target_link_libraries(gpuh_backend PUBLIC ngraph hybrid_base gpu_backend)
install(TARGETS gpuh_backend
LIBRARY DESTINATION "${NGRAPH_INSTALL_LIB}"
ARCHIVE DESTINATION "${NGRAPH_INSTALL_LIB}"
)
endif()
//*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#include "ngraph/runtime/gpuh/gpuh_backend.hpp"
#include "ngraph/graph_util.hpp"
#include "ngraph/pass/manager.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/gpu/gpu_backend.hpp"
#include "ngraph/runtime/interpreter/int_backend.hpp"
#include "ngraph/runtime/tensor.hpp"
using namespace ngraph;
using namespace std;
extern "C" runtime::BackendConstructor* get_backend_constructor_pointer()
{
class LocalBackendConstructor : public runtime::BackendConstructor
{
public:
std::shared_ptr<runtime::Backend> create(const std::string& config) override
{
return std::make_shared<runtime::gpuh::GPUHBackend>();
}
};
static unique_ptr<runtime::BackendConstructor> s_backend_constructor(
new LocalBackendConstructor());
return s_backend_constructor.get();
}
runtime::gpuh::GPUHBackend::GPUHBackend()
: HybridBackend({make_shared<ngraph::runtime::gpu::GPU_Backend>(),
make_shared<ngraph::runtime::interpreter::INTBackend>()})
{
}
//*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "ngraph/runtime/hybrid/hybrid_backend.hpp"
namespace ngraph
{
namespace runtime
{
namespace gpuh
{
class GPUHBackend;
}
}
}
class ngraph::runtime::gpuh::GPUHBackend : public ngraph::runtime::hybrid::HybridBackend
{
public:
GPUHBackend();
};
computation_reuse
tensorview_custom_mem
batch_norm_inference_f64
batch_norm_inference_f32
send_recv
send_recv_ring
# axes input param not supported
lrn_across_h
lrn_across_hw
lrn_across_all_dims
lrn_across_nw
lrn_across_empty
lrn_6D_across_2_axes
......@@ -599,10 +599,6 @@ if (NGRAPH_NOP_ENABLE)
target_link_libraries(unit-test PRIVATE nop_backend)
endif()
if (NGRAPH_GPUH_ENABLE)
target_link_libraries(unit-test PRIVATE gpuh_backend)
endif()
if (NGRAPH_MLIR_ENABLE)
target_include_directories(unit-test PRIVATE ${CMAKE_BINARY_DIR}/src/contrib/mlir)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment