Browse Source

fix cast multi thread

tags/v1.2.0-rc1
yeyunpeng 4 years ago
parent
commit
f840c8ccae
4 changed files with 10 additions and 8 deletions
  1. +5
    -4
      mindspore/lite/src/ops/deconv2d.cc
  2. +2
    -2
      mindspore/lite/src/runtime/kernel/arm/fp16/cast_fp16.h
  3. +2
    -2
      mindspore/lite/src/runtime/kernel/arm/fp32/cast_fp32.h
  4. +1
    -0
      mindspore/lite/test/models_tf.cfg

+ 5
- 4
mindspore/lite/src/ops/deconv2d.cc View File

@@ -271,10 +271,11 @@ int DeConv2D::UnPackToFlatBuilder(const schema::Primitive *primitive, flatbuffer
MS_LOG(ERROR) << "value_as_DeConv2D return nullptr";
return RET_ERROR;
}
auto val_offset = schema::CreateDeConv2D(
*fbb, attr->format(), attr->group(), attr->channelIn(), attr->channelOut(), attr->kernelW(), attr->kernelH(),
attr->strideW(), attr->strideH(), attr->padMode(), attr->padUp(), attr->padDown(), attr->padLeft(),
attr->padRight(), attr->dilateW(), attr->dilateH(), attr->hasBias(), attr->activationType());
auto val_offset =
schema::CreateDeConv2D(*fbb, attr->format(), attr->group(), attr->channelIn(), attr->channelOut(), attr->kernelW(),
attr->kernelH(), attr->strideW(), attr->strideH(), attr->padMode(), attr->padUp(),
attr->padDown(), attr->padLeft(), attr->padRight(), attr->dilateW(), attr->dilateH(),
attr->hasBias(), attr->activationType(), attr->outputPaddingW(), attr->outputPaddingH());
auto prim_offset = schema::CreatePrimitive(*fbb, schema::PrimitiveType_DeConv2D, val_offset.o);
fbb->Finish(prim_offset);
return RET_OK;


+ 2
- 2
mindspore/lite/src/runtime/kernel/arm/fp16/cast_fp16.h View File

@@ -38,8 +38,8 @@ class CastFp16CPUKernel : public LiteKernel {
int DoCast(int thread_id);

private:
uint32_t stride_;
uint32_t data_num_;
int stride_;
int data_num_;
};
} // namespace mindspore::kernel



+ 2
- 2
mindspore/lite/src/runtime/kernel/arm/fp32/cast_fp32.h View File

@@ -39,8 +39,8 @@ class CastCPUKernel : public LiteKernel {
int DoCast(int thread_id);

private:
uint32_t stride_;
uint32_t data_num_;
int stride_;
int data_num_;
};
} // namespace mindspore::kernel



+ 1
- 0
mindspore/lite/test/models_tf.cfg View File

@@ -3,3 +3,4 @@ decoder_step_201217_modified.pb 5
unet_model_reconstruct.pb 1;1,256,256,3
encoder_201228.pb 3;1:1,22:1
female_model_step2_int16_noiseout.pb 66
fasterrcnn_crop.pb 1;236,190,3

Loading…
Cancel
Save