[enco] Allocate weight through bag (#2634)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 12 Dec 2018 05:05:46 +0000 (14:05 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 12 Dec 2018 05:05:46 +0000 (14:05 +0900)
This commit removes all the allocate method call with "object" (which is
deprecated).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/Transforms/DataLayoutConversion.cpp
contrib/enco/frontend/caffe/src/Layer/Convolution.cpp
contrib/enco/frontend/tflite/src/Op/DepthwiseConv2D.cpp

index e556e86..524574b 100644 (file)
@@ -214,7 +214,7 @@ void change_conv2d_kernel_layout(coco::Conv2D *conv)
   new_obj->bag(new_bag);
   new_obj->layout(coco::KernelLayouts::NHWC::create(ker_shape));
 
-  d->f32()->allocate(new_obj);
+  d->f32()->allocate(new_bag);
 
   auto src = d->f32()->read(old_obj);
   auto dst = d->f32()->access(new_obj);
index 50687d4..9fb096d 100644 (file)
@@ -91,7 +91,7 @@ void ConvolutionBuilder::build(const ::caffe::LayerParameter &layer,
   ker_obj->layout(NCHW::create(as_kernel_shape(ker_shape)));
 
   // Create a kernel overlay for the kernel object
-  data->f32()->allocate(ker_obj);
+  data->f32()->allocate(ker_bag);
 
   // Initialize the kernel overlay
   assert(weight_ctx.blob_count(layer.name()) >= 1);
index 5583d00..13e99ed 100644 (file)
@@ -113,7 +113,7 @@ void DepthwiseConv2DGraphBuilder::build(const tflite::Operator *op,
 
   // Create a kernel overlay for the kernel object
   // TODO : support for other types
-  d->f32()->allocate(ker_obj);
+  d->f32()->allocate(ker_bag);
 
   TflBufferContext::TflBuffer<float> buffer = buffer_context.tensor_buffer<float>(graph, ker_idx);