/** * Copyright 2020 Huawei Technologies Co., Ltd * * 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 #include "framework/ge_runtime/model_runner.h" #include "runtime/device/ascend/tasksink/runtime_utils.h" namespace ge { namespace model_runner { ModelRunner &ModelRunner::Instance() { static ModelRunner runner; return runner; } bool ModelRunner::LoadDavinciModel(uint32_t device_id, uint64_t session_id, uint32_t model_id, std::shared_ptr ascend_model, std::shared_ptr listener) { return true; } bool ModelRunner::UnloadModel(uint32_t model_id) { return true; } bool ModelRunner::LoadModelComplete(uint32_t model_id) { return true; } bool ModelRunner::RunModel(uint32_t model_id, const ge::InputData &input_data, ge::OutputData *output_data) { return true; } void *ModelRunner::GetModelHandle(uint32_t model_id) const { return nullptr; } bool ModelRunner::DistributeTask(uint32_t model_id) { return true; } const std::vector &ModelRunner::GetTaskIdList(uint32_t model_id) const { static std::vector task_id_list; return task_id_list; } const std::vector &ModelRunner::GetStreamIdList(uint32_t model_id) const { static std::vector stream_id_list; return stream_id_list; } const std::map> &ModelRunner::GetRuntimeInfoMap(uint32_t model_id) const { static std::map> runtime_info_map; return runtime_info_map; } } // namespace model_runner } // namespace ge namespace mindspore { namespace device { namespace ascend { namespace tasksink { bool RuntimeUtils::HcomBindModel(rtModel_t model, rtStream_t stream) { return true; } bool RuntimeUtils::HcomUnbindModel(rtModel_t model) { return true; } bool RuntimeUtils::HcomDistribute(const std::shared_ptr &task_info, rtStream_t stream) { return true; } } // namespace tasksink } // namespace ascend } // namespace device } // namespace mindspore