Commit 7c970df3 authored by Dmitry I. Lyakh's avatar Dmitry I. Lyakh
Browse files

Added a memory window pointer component to TensorNetworkReq


Signed-off-by: default avatarDmitry I. Lyakh <quant4me@gmail.com>
parent 72d2d3a2
......@@ -46,6 +46,7 @@ namespace runtime {
struct TensorDescriptor {
std::vector<int32_t> modes; //indices associated with tensor dimensions
std::vector<int64_t> extents; //tensor dimension extents
std::vector<int64_t> strides; //tensor dimension strides (optional)
void * body_ptr = nullptr; //pointer to the tensor body image
std::size_t volume = 0; //tensor body volume
cudaDataType_t data_type; //tensor element data type
......@@ -61,6 +62,7 @@ struct TensorNetworkReq {
cutensornetContractionPlan_t comp_plan;
cudaStream_t stream;
cutensornetComputeType_t compute_type;
void * memory_window_ptr = nullptr;
TensorNetworkQueue::ExecStat exec_status = TensorNetworkQueue::ExecStat::Idle;
};
......
/** ExaTN:: Tensor Runtime: Tensor graph executor: Lazy
REVISION: 2021/12/27
REVISION: 2021/12/29
Copyright (C) 2018-2021 Dmitry Lyakh
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle)
......@@ -290,13 +290,13 @@ void LazyGraphExecutor::execute(TensorNetworkQueue & tensor_network_queue) {
int error_code = 0;
const auto current = tensor_network_queue.getCurrent();
const auto exec_handle = current->second;
auto exec_stat = cuquantum_executor_->sync(exec_handle,&error_code,false);
auto exec_stat = cuquantum_executor_->sync(exec_handle,&error_code,false); //this call will progress tensor network execution
assert(error_code == 0);
if(exec_stat == TensorNetworkQueue::ExecStat::None){
exec_stat = cuquantum_executor_->execute(current->first,exec_handle);
if(exec_stat != TensorNetworkQueue::ExecStat::None){
auto prev_exec_stat = tensor_network_queue.updateExecStatus(exec_handle,exec_stat);
std::cout << "#DEBUG(exatn::runtime::LazyGraphExecutor::execute): Submitted tensor network to cuQuantum\n";
auto prev_exec_stat = tensor_network_queue.updateExecStatus(exec_handle,exec_stat);
std::cout << "#DEBUG(exatn::runtime::LazyGraphExecutor::execute): Submitted tensor network to cuQuantum\n";
}
not_over = tensor_network_queue.next();
}else if(exec_stat == TensorNetworkQueue::ExecStat::Completed){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment