forked from mindspore-Ecosystem/mindspore
fix bugs
This commit is contained in:
parent
1ca715c7e7
commit
88aaebf23d
|
@ -21,7 +21,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "schema/model_generated.h"
|
#include "schema/model_generated.h"
|
||||||
#include "src/ops/primitive_c.h"
|
|
||||||
|
|
||||||
namespace mindspore {
|
namespace mindspore {
|
||||||
#define MS_API __attribute__((visibility("default")))
|
#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();
|
MS_LOG(ERROR) << "run kernel failed, name: " << kernel->name();
|
||||||
return ret;
|
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 != nullptr) {
|
||||||
if (!after(PackToMSTensors(kernel->in_tensors()), PackToMSTensors(kernel->out_tensors()),
|
if (!after(PackToMSTensors(kernel->in_tensors()), PackToMSTensors(kernel->out_tensors()),
|
||||||
{kernel->name(), kernel->type_str()})) {
|
{kernel->name(), kernel->type_str()})) {
|
||||||
|
|
|
@ -130,7 +130,8 @@ kernel::LiteKernel *KernelRegistry::GetKernel(const std::vector<tensor::Tensor *
|
||||||
MS_EXCEPTION_IF_NULL(ctx);
|
MS_EXCEPTION_IF_NULL(ctx);
|
||||||
auto parameter = kernel::PopulateParameter(primitive);
|
auto parameter = kernel::PopulateParameter(primitive);
|
||||||
if (parameter == nullptr) {
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
auto creator = GetCreator(key);
|
auto creator = GetCreator(key);
|
||||||
|
|
|
@ -40,7 +40,7 @@ constexpr uint32_t kDoubleNum = 2;
|
||||||
constexpr uint32_t kMultiNum = 3;
|
constexpr uint32_t kMultiNum = 3;
|
||||||
constexpr uint32_t kDimension_4d = 4;
|
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
|
// #if LITE_OPTIMIZE
|
||||||
class PrimitiveC {
|
class PrimitiveC {
|
||||||
|
|
Loading…
Reference in New Issue