!4667 Fix some irregularities
Merge pull request !4667 from yeyunpeng2020/master_cops_3
This commit is contained in:
commit
0b3ab6b70f
|
@ -21,7 +21,6 @@
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
#include "schema/model_generated.h"
|
||||
#include "src/ops/primitive_c.h"
|
||||
|
||||
namespace mindspore {
|
||||
#define MS_API __attribute__((visibility("default")))
|
||||
|
|
|
@ -49,13 +49,6 @@ int Executor::Run(std::vector<tensor::Tensor *> &in_tensors, std::vector<tensor:
|
|||
MS_LOG(ERROR) << "run kernel failed, name: " << kernel->name();
|
||||
return ret;
|
||||
}
|
||||
MS_LOG(INFO) << "out_tensors";
|
||||
auto tensors = kernel->out_tensors();
|
||||
MS_LOG(INFO) << kernel->name();
|
||||
for (int i = 0; i < tensors.size(); ++i) {
|
||||
auto tensor = tensors[i];
|
||||
MS_LOG(INFO) << tensor->ToString();
|
||||
}
|
||||
if (after != nullptr) {
|
||||
if (!after(PackToMSTensors(kernel->in_tensors()), PackToMSTensors(kernel->out_tensors()),
|
||||
{kernel->name(), kernel->type_str()})) {
|
||||
|
|
|
@ -123,14 +123,15 @@ bool KernelRegistry::Merge(const std::unordered_map<KernelKey, KernelCreator> &n
|
|||
const kernel::KernelCreator *KernelRegistry::GetCreatorArrays() { return creator_arrays_; }
|
||||
|
||||
kernel::LiteKernel *KernelRegistry::GetKernel(const std::vector<tensor::Tensor *> &in_tensors,
|
||||
const std::vector<tensor::Tensor *> &out_tensors,
|
||||
const PrimitiveC *primitive, const Context *ctx,
|
||||
const kernel::KernelKey &key) {
|
||||
const std::vector<tensor::Tensor *> &out_tensors,
|
||||
const PrimitiveC *primitive, const Context *ctx,
|
||||
const kernel::KernelKey &key) {
|
||||
MS_EXCEPTION_IF_NULL(primitive);
|
||||
MS_EXCEPTION_IF_NULL(ctx);
|
||||
auto parameter = kernel::PopulateParameter(primitive);
|
||||
if (parameter == nullptr) {
|
||||
MS_LOG(ERROR) << "PopulateParameter return nullptr, type: " << primitive->Type();
|
||||
MS_LOG(ERROR) << "PopulateParameter return nullptr, type: "
|
||||
<< schema::EnumNamePrimitiveType((schema::PrimitiveType)primitive->Type());
|
||||
return nullptr;
|
||||
}
|
||||
auto creator = GetCreator(key);
|
||||
|
|
|
@ -40,7 +40,7 @@ constexpr uint32_t kDoubleNum = 2;
|
|||
constexpr uint32_t kMultiNum = 3;
|
||||
constexpr uint32_t kDimension_4d = 4;
|
||||
|
||||
const std::set<int> kSupportDataType = {kNumberTypeUInt8, kNumberTypeInt32, kNumberTypeFloat32};
|
||||
const std::set<int> kSupportDataType = {kNumberTypeUInt8, kNumberTypeInt32, kNumberTypeFloat32, kNumberTypeFloat16};
|
||||
|
||||
// #if LITE_OPTIMIZE
|
||||
class PrimitiveC {
|
||||
|
|
Loading…
Reference in New Issue