Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
exatn
Commits
7c970df3
Commit
7c970df3
authored
Dec 29, 2021
by
Dmitry I. Lyakh
Browse files
Added a memory window pointer component to TensorNetworkReq
Signed-off-by:
Dmitry I. Lyakh
<
quant4me@gmail.com
>
parent
72d2d3a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/runtime/executor/cuquantum/cuquantum_executor.cu
View file @
7c970df3
...
...
@@ -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
;
};
...
...
src/runtime/executor/graph_executors/lazy/graph_executor_lazy.cpp
View file @
7c970df3
/** ExaTN:: Tensor Runtime: Tensor graph executor: Lazy
REVISION: 2021/12/2
7
REVISION: 2021/12/2
9
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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment