From 9854cf7b89b5cb4aa946a9d32ea6f75033a235c1 Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@miranda.cs.illinois.edu> Date: Wed, 9 Jun 2021 19:07:38 -0500 Subject: [PATCH] Adding missing dummy tensor utilities needed for NVDLA compilation --- hpvm/include/nvdla/tensor.h | 3 +++ hpvm/include/nvdla/tensorUtils.h | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/hpvm/include/nvdla/tensor.h b/hpvm/include/nvdla/tensor.h index 3a566ffdfc..33b9e0aa21 100644 --- a/hpvm/include/nvdla/tensor.h +++ b/hpvm/include/nvdla/tensor.h @@ -23,5 +23,8 @@ struct Tensor { struct Dimension dims; }; +// NOTE: Currently only NCHW is supported due to limited cuDNN support +enum Tensor_format_t { nchw, nhwc }; + #endif diff --git a/hpvm/include/nvdla/tensorUtils.h b/hpvm/include/nvdla/tensorUtils.h index ea36e1d2fb..ab197ccf83 100644 --- a/hpvm/include/nvdla/tensorUtils.h +++ b/hpvm/include/nvdla/tensorUtils.h @@ -48,4 +48,40 @@ float computeAccuracy3(uint32_t *labels, void *result_ptr) { } +// tensor_runtime.h empty definitions - for NVDLA-based compilation to work (functions not actually used) + + +void *create4DTensor(int data_type, int data_format, size_t dim1_size, + size_t dim2_size, size_t dim3_size, size_t dim4_size){ + +} + + +void startMemTracking(){ +} + +void freeBatchMemory(){ + +} + +void hpvm_request_tensor(void *tensor, int destination){ + +} + + +void llvm_hpvm_initializeRuntimeController(const char *){ + +} + + +void llvm_hpvm_invokeRtControl(void *result, + const char *str, + int start, + int end){ + + +} + + + #endif -- GitLab