build_metal_off.cc 623 Bytes
Newer Older
1 2
/*!
 *  Copyright (c) 2018 by Contributors
3
 *  Optional module when build metal is switched to off
4
 */
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include "../codegen_source_base.h"
#include "../../runtime/metal/metal_module.h"

namespace tvm {
namespace runtime {

Module MetalModuleCreate(std::string data,
                         std::string fmt,
                         std::unordered_map<std::string, FunctionInfo> fmap,
                         std::string source) {
  LOG(WARNING) << "Metal runtime not enabled, return a source module...";
  return codegen::DeviceSourceModuleCreate(data, fmt, fmap, "metal");
}

}  // namespace runtime
}  // namespace tvm