@@ -454,14 +454,8 @@ odla_status odla_BindToArgument(odla_value value, const odla_void* data_ptr,
454
454
std::cout << " [vODLA] ERROR: input data " << idx << " pointer is NULL.\n " ;
455
455
return ODLA_FAILURE;
456
456
}
457
- if (context->ipPtr [idx] != data_ptr) {
458
- context->ipPtr [idx] = data_ptr;
459
- context->dataChg = true ;
460
- #ifdef DEBUG
461
- std::cout << " [vODLA] DEBUG: input " << idx << " address changed to "
462
- << data_ptr << " \n " ;
463
- #endif
464
- }
457
+ context->ipPtr [idx] = data_ptr;
458
+ context->dataChg = true ;
465
459
context->ipNum ++;
466
460
return ODLA_SUCCESS;
467
461
}
@@ -484,14 +478,8 @@ odla_status odla_BindToOutput(odla_value value, odla_void* data_ptr,
484
478
std::cout << " [vODLA] ERROR: output data " << idx << " pointer is NULL.\n " ;
485
479
return ODLA_FAILURE;
486
480
}
487
- if (context->opPtr [idx] != data_ptr) {
488
- context->opPtr [idx] = data_ptr;
489
- context->dataChg = true ;
490
- #ifdef DEBUG
491
- std::cout << " [vODLA] DEBUG: output " << idx << " address changed to "
492
- << data_ptr << " \n " ;
493
- #endif
494
- }
481
+ context->opPtr [idx] = data_ptr;
482
+ context->dataChg = true ;
495
483
context->opNum ++;
496
484
return ODLA_SUCCESS;
497
485
}
@@ -614,10 +602,6 @@ void deallocDMA(struct vodh_infer_options& vodh_infer_opt,
614
602
/* DeAllocate DMA for outputs*/
615
603
if (vodh_infer_res.output && op) {
616
604
for (u32 i = 0 ; i < vodh_infer_res.output_num ; i++) {
617
- #ifdef DEBUG
618
- printf (" output %d data at %p\n " , i, vodh_infer_result.output [i]->data );
619
- #endif
620
-
621
605
vodh_free (vodh_infer_res.output [i]->data );
622
606
vodh_infer_res.output [i]->data = NULL ;
623
607
delete vodh_infer_res.output [i];
@@ -648,6 +632,11 @@ bool allocDMA(struct vodh_infer_options& vodh_infer_opt,
648
632
649
633
/* Alloc DMA memory for input data */
650
634
u32 ip_mem_cap = 0 ;
635
+ #ifdef DEBUG
636
+ std::cout << " [vODLA] DEBUG: vodh_infer_opt.input_num "
637
+ << vodh_infer_opt.input_num << " context->ipNum " << context->ipNum
638
+ << std::endl;
639
+ #endif
651
640
if (vodh_infer_opt.input_num != context->ipNum ) {
652
641
deallocDMA (vodh_infer_opt, vodh_infer_res, true , false );
653
642
vodh_infer_opt.input_num = context->ipNum ;
@@ -955,9 +944,7 @@ odla_status odla_ExecuteComputation(odla_computation comp, odla_context context,
955
944
vodh_infer_opt.model .use_file = 1 ; // use file path instead of DMA
956
945
vodh_infer_opt.context = context->vodla_context_ ;
957
946
strcpy (vodh_infer_opt.model .weight_file , comp->wtFile .c_str ());
958
- #ifdef DEBUG
959
947
std::cout << " [vODLA] INFO: start remote inference...\n " ;
960
- #endif
961
948
962
949
#ifdef TIMING
963
950
std::cout << " [vODLA] INFO: loop " << LOOP_CNT << " times.\n " ;
0 commit comments