summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9ca8bb)
raw | patch | inline | side by side (parent: a9ca8bb)
author | Ajay Jayaraj <ajayj@ti.com> | |
Mon, 15 Oct 2018 16:49:01 +0000 (11:49 -0500) | ||
committer | Ajay Jayaraj <ajayj@ti.com> | |
Mon, 15 Oct 2018 16:49:01 +0000 (11:49 -0500) |
Added the following parameters to Configuration:
* quantHistoryParam1
* quantHistoryParam2
* quantMargin
These parameters can be specified in the configuration file or set
directly in the code.
(MCT-1062)
* quantHistoryParam1
* quantHistoryParam2
* quantMargin
These parameters can be specified in the configuration file or set
directly in the code.
(MCT-1062)
index a26fbb9c309eb1b6276661da34b13a6a915ac3e3..913272a7f2bc1954e156507f448befdfb0eb01d8 100644 (file)
//! size.
bool showHeapStats;
+ int quantHistoryParam1;
+ int quantHistoryParam2;
+ int quantMargin;
+
//! Default constructor.
Configuration();
index 789638730f21791b4f303c405eeb68abb57da0fe..8f512e8654d9d8fdce08732eaf093597e1628df3 100644 (file)
PARAM_HEAP_SIZE(9 << 20), // 9MB for mobileNet1
enableOutputTrace(false),
enableApiTrace(false),
- showHeapStats(false)
+ showHeapStats(false),
+ quantHistoryParam1(20),
+ quantHistoryParam2(5),
+ quantMargin(0)
{
}
index 5871e718bd74a1c2206ea0a0f292ec4d9f47bccb..f4575605ca7a68cc783706e463aa318f46c0806b 100644 (file)
lit("outData") >> '=' >> q_path[ph::ref(x.outData) = _1] |
lit("netBinFile") >> '=' >> q_path[ph::ref(x.netBinFile) = _1] |
lit("paramsBinFile") >> '=' >> q_path[ph::ref(x.paramsBinFile) = _1] |
- lit("enableTrace") >> '=' >> bool_[ph::ref(x.enableOutputTrace)= _1]
+ lit("enableTrace") >> '=' >> bool_[ph::ref(x.enableOutputTrace)= _1] |
+ lit("quantHistoryParam1") >> '=' >>
+ int_[ph::ref(x.quantHistoryParam1)= _1] |
+ lit("quantHistoryParam2") >> '=' >>
+ int_[ph::ref(x.quantHistoryParam2)= _1] |
+ lit("quantMargin") >> '=' >> int_[ph::ref(x.quantMargin)= _1]
;
}
index 9bd3a6e72678664e48a7728a93dc12fe2cdb07f0..2535f90aef11625baea0d5818d7ddecdbd3489d5 100644 (file)
up_malloc_ddr<TIDL_CreateParams> shared_createparam(
malloc_ddr<TIDL_CreateParams>(),
&__free_ddr);
- InitializeNetworkCreateParam(shared_createparam.get());
+ InitializeNetworkCreateParam(shared_createparam.get(), configuration);
// Read network from file into network struct in TIDL_CreateParams
sTIDL_Network_t *net = &(shared_createparam.get())->net;
}
-void ExecutorImpl::InitializeNetworkCreateParam(TIDL_CreateParams *CP)
+void ExecutorImpl::InitializeNetworkCreateParam(TIDL_CreateParams *CP,
+ const Configuration& c)
{
CP->currCoreId = layers_group_id_m;
CP->currLayersGroupId = layers_group_id_m;
CP->l2MemSize = tidl::internal::DMEM1_SIZE;
CP->l3MemSize = tidl::internal::OCMC_SIZE;
- CP->quantHistoryParam1 = tidl::internal::QUANT_HISTORY_PARAM1;
- CP->quantHistoryParam2 = tidl::internal::QUANT_HISTORY_PARAM2;
- CP->quantMargin = tidl::internal::QUANT_MARGIN;
+ CP->quantHistoryParam1 = c.quantHistoryParam1;
+ CP->quantHistoryParam2 = c.quantHistoryParam2;
+ CP->quantMargin = c.quantMargin;
// If trace is enabled, setup the device TIDL library to allocate separate
// output buffers for each layer. This makes it possible for the host
index a6a84215858b6f192bcb602ff879bc6bd5f5db75..bc6b187668714039e48ce9bfdb600ee019f705c6 100644 (file)
ExecutionObjects execution_objects_m;
private:
- void InitializeNetworkCreateParam(TIDL_CreateParams *cp);
+ void InitializeNetworkCreateParam(TIDL_CreateParams *cp,
+ const Configuration& c);
bool InitializeNetworkParams(TIDL_CreateParams *cp);
void Cleanup();
index eb93fd2e37c780dcda7c1de9eb9b9b75911554b9..3ea047eeb8bf36a9d15e5304705104afaa9fb65f 100644 (file)
const size_t DMEM0_SIZE = 8*1024;
const size_t DMEM1_SIZE = 128*1024;
const size_t OCMC_SIZE = 320*1024;
-const int QUANT_HISTORY_PARAM1 = 20;
-const int QUANT_HISTORY_PARAM2 = 5;
-const int QUANT_MARGIN = 0;
const int CURR_LAYERS_GROUP_ID = 1;
const int CURR_CORE_ID = 1;