ge_task_launch_stub.cc 2.5 KB
Newer Older
Z
zhunaipan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/**
 * 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 <vector>
#include "framework/ge_runtime/model_runner.h"
L
liubuyu 已提交
18
#include "runtime/device/ascend/tasksink/runtime_utils.h"
Z
zhunaipan 已提交
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

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<DavinciModel> ascend_model,
                                   std::shared_ptr<ge::ModelListener> listener) {
  return true;
}

bool ModelRunner::UnloadModel(uint32_t model_id) { return true; }

C
caifubi 已提交
35 36
bool ModelRunner::LoadModelComplete(uint32_t model_id) { return true; }

Z
zhunaipan 已提交
37 38 39 40
bool ModelRunner::RunModel(uint32_t model_id, const ge::InputData &input_data, ge::OutputData *output_data) {
  return true;
}

Z
zhoufeng 已提交
41 42 43 44
void *ModelRunner::GetModelHandle(uint32_t model_id) const { return nullptr; }

bool ModelRunner::DistributeTask(uint32_t model_id) { return true; }

Z
zhunaipan 已提交
45 46 47 48
const std::vector<uint32_t> &ModelRunner::GetTaskIdList(uint32_t model_id) const {
  static std::vector<uint32_t> task_id_list;
  return task_id_list;
}
C
caifubi 已提交
49 50 51 52 53

const std::vector<uint32_t> &ModelRunner::GetStreamIdList(uint32_t model_id) const {
  static std::vector<uint32_t> stream_id_list;
  return stream_id_list;
}
C
caifubi 已提交
54 55 56 57 58

const std::map<std::string, std::shared_ptr<RuntimeInfo>> &ModelRunner::GetRuntimeInfoMap(uint32_t model_id) const {
  static std::map<std::string, std::shared_ptr<RuntimeInfo>> runtime_info_map;
  return runtime_info_map;
}
Z
zhunaipan 已提交
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
}  // 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<HcclTaskInfo> &task_info, rtStream_t stream) { return true; }
}  // namespace tasksink
}  // namespace ascend
}  // namespace device
}  // namespace mindspore