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

Added an empty CuQuantumExecutor class.


Signed-off-by: default avatarDmitry I. Lyakh <quant4me@gmail.com>
parent 984ac786
......@@ -16,11 +16,11 @@ add_library(${LIBRARY_NAME}
add_dependencies(${LIBRARY_NAME} exatensor-build)
target_include_directories(${LIBRARY_NAME}
PUBLIC . graph optimizer executor ${CMAKE_SOURCE_DIR}/src/exatn)
PUBLIC . graph optimizer executor executor/cuquantum ${CMAKE_SOURCE_DIR}/src/exatn)
target_link_libraries(${LIBRARY_NAME}
PUBLIC CppMicroServices exatn-utils exatn-numerics exatn-runtime-graph
PRIVATE Boost::graph)
PRIVATE Boost::graph exatn_runtime_cuquantum)
exatn_configure_library_rpath(${LIBRARY_NAME})
......
......@@ -37,10 +37,14 @@ usfunctionembedresources(TARGET
manifest.json)
target_link_libraries(${LIBRARY_NAME}
PUBLIC CppMicroServices exatn-numerics exatn-runtime exatn_runtime_cuquantum
PUBLIC CppMicroServices exatn-numerics exatn-runtime
PRIVATE ExaTensor::ExaTensor
)
if(CUQUANTUM)
target_link_libraries(${LIBRARY_NAME} PUBLIC exatn_runtime_cuquantum)
endif()
exatn_configure_plugin_rpath(${LIBRARY_NAME})
if(CUQUANTUM)
......
......@@ -8,7 +8,7 @@ Rationale:
**/
//#ifdef CUQUANTUM
#ifdef CUQUANTUM
#include "cuquantum_executor.hpp"
......@@ -26,4 +26,4 @@ CuQuantumExecutor::CuQuantumExecutor()
} //namespace runtime
} //namespace exatn
//#endif //CUQUANTUM
#endif //CUQUANTUM
/** ExaTN: Tensor Runtime: Tensor network executor: NVIDIA cuQuantum
REVISION: 2021/12/14
REVISION: 2021/12/20
Copyright (C) 2018-2021 Dmitry Lyakh
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle)
Rationale:
- ExaTN graph executor may accept whole tensor networks for execution
via the optional cuQuantum backend in which case the graph executor
will delegate execution of whole tensor networks to CuQuantumExecutor.
**/
//#ifdef CUQUANTUM
#ifdef CUQUANTUM
#ifndef EXATN_RUNTIME_CUQUANTUM_EXECUTOR_HPP_
#define EXATN_RUNTIME_CUQUANTUM_EXECUTOR_HPP_
#include "tensor_network.hpp"
#include "tensor_operation.hpp"
#include <cutensornet.h>
#include <cutensor.h>
#include <cuda_runtime.h>
......@@ -34,6 +40,15 @@ public:
virtual ~CuQuantumExecutor() = default;
int execute(numerics::TensorNetwork & network,
TensorOpExecHandle * exec_handle);
bool sync(TensorOpExecHandle op_handle,
int * error_code,
bool wait = true);
bool sync();
protected:
};
......@@ -43,4 +58,4 @@ protected:
#endif //EXATN_RUNTIME_CUQUANTUM_EXECUTOR_HPP_
//#endif //CUQUANTUM
#endif //CUQUANTUM
/** ExaTN:: Tensor Runtime: Task-based execution layer for tensor operations
REVISION: 2021/09/22
REVISION: 2021/12/14
Copyright (C) 2018-2021 Dmitry Lyakh, Tiffany Mintz, Alex McCaskey
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle)
......@@ -10,6 +10,10 @@ Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle)
#include "talshxx.hpp"
#ifdef CUQUANTUM
#include "cuquantum_executor.hpp"
#endif
#ifdef MPI_ENABLED
#include "mpi.h"
#endif
......
/** ExaTN:: Tensor Runtime: Task-based execution layer for tensor operations
REVISION: 2021/09/22
REVISION: 2021/12/14
Copyright (C) 2018-2021 Dmitry Lyakh, Tiffany Mintz, Alex McCaskey
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle)
......
Subproject commit c3c16d0927fa405520b20aca8d30c520ab9c1ece
Subproject commit cf2acb5276c3e1d60986e6ea8f50bce1949e75e6
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