From afc7db1d30e88c232b55f3edcf27e06b2565ea5a Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@miranda.cs.illinois.edu> Date: Wed, 28 Apr 2021 02:33:29 -0500 Subject: [PATCH] BugFIX: Removing autogenerated calls for hpvm_request_tensor calls for HPVM Node args --- .../DFG2LLVM_WrapperAPI/DFG2LLVM_WrapperAPI.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/hpvm/lib/Transforms/DFG2LLVM_WrapperAPI/DFG2LLVM_WrapperAPI.cpp b/hpvm/lib/Transforms/DFG2LLVM_WrapperAPI/DFG2LLVM_WrapperAPI.cpp index c0dbd3899b..1aec81d69b 100644 --- a/hpvm/lib/Transforms/DFG2LLVM_WrapperAPI/DFG2LLVM_WrapperAPI.cpp +++ b/hpvm/lib/Transforms/DFG2LLVM_WrapperAPI/DFG2LLVM_WrapperAPI.cpp @@ -1243,8 +1243,7 @@ private: // HPVM Runtime API and Tensor runtime API FunctionCallee llvm_hpvm_initApproxhpvmRt; FunctionCallee llvm_hpvm_cleanupApproxhpvmRt; - FunctionCallee hpvm_request_tensor; - + FunctionCallee llvm_hpvm_initializeRuntimeController; FunctionCallee llvm_hpvm_clearRuntimeController; @@ -1286,11 +1285,9 @@ void CGT_WrapperAPI::initRuntimeAPI() { // Get or insert Global declarations for // - initialization // - cleanup - // - request a tensor DECLARE(llvm_hpvm_initApproxhpvmRt); DECLARE(llvm_hpvm_cleanupApproxhpvmRt); - DECLARE(hpvm_request_tensor); - + DECLARE(llvm_hpvm_initializeRuntimeController); DECLARE(llvm_hpvm_clearRuntimeController); @@ -1403,15 +1400,6 @@ void CGT_WrapperAPI::codeGen(DFLeafNode *N) { ConstantInt *TargetDeviceID = ConstantInt::get(Type::getInt32Ty(M.getContext()), 1); - for (Function::arg_iterator ai = F_wrapper_api->arg_begin(), - ae = F_wrapper_api->arg_end(); - ai != ae; ++ai) { - Argument *Arg = &*ai; - if (Arg->getType()->isPointerTy()) { - Value *Args[] = {Arg, TargetDeviceID}; - CallInst::Create(hpvm_request_tensor, ArrayRef<Value *>(Args, 2), "", FI); - } - } CodeGenStateMachine CGM(&M, runtimeModule.get()); -- GitLab