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
f1c8ee3d
Commit
f1c8ee3d
authored
Jan 08, 2022
by
Dmitry I. Lyakh
Browse files
cuQuantum backend seems to work, but reports weird flop count ...
Signed-off-by:
Dmitry I. Lyakh
<
quant4me@gmail.com
>
parent
2108557e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/exatn/tests/NumServerTester.cpp
View file @
f1c8ee3d
...
...
@@ -3789,9 +3789,9 @@ TEST(NumServerTester, CuTensorNet) {
const
auto
TENS_ELEM_TYPE
=
TensorElementType
::
REAL32
;
const
int
NUM_REPEATS
=
1
;
const
int
NUM_REPEATS
=
3
;
exatn
::
resetLoggingLevel
(
2
,
2
);
//debug
//
exatn::resetLoggingLevel(2,2); //debug
bool
success
=
true
;
...
...
@@ -3808,7 +3808,7 @@ TEST(NumServerTester, CuTensorNet) {
success
=
exatn
::
initTensor
(
"D"
,
0.0
);
assert
(
success
);
success
=
exatn
::
sync
();
assert
(
success
);
exatn
::
switchComputationalBackend
(
"cuquantum
"
);
exatn
::
switchComputationalBackend
(
"
default"
);
//{default|
cuquantum
}
//Contract tensor network:
int
num_repeats
=
NUM_REPEATS
;
...
...
@@ -3820,7 +3820,8 @@ TEST(NumServerTester, CuTensorNet) {
success
=
exatn
::
sync
(
"D"
,
true
);
assert
(
success
);
auto
duration
=
exatn
::
Timer
::
timeInSecHR
(
time_start
);
flops
=
exatn
::
getTotalFlopCount
()
-
flops
;
std
::
cout
<<
"Duration = "
<<
duration
<<
" s; Performance = "
<<
(
flops
/
(
1e9
*
duration
))
<<
" Gflop/s
\n
"
;
std
::
cout
<<
"Duration = "
<<
duration
<<
" s; GFlop count = "
<<
flops
/
1e9
<<
"; Performance = "
<<
(
flops
/
(
1e9
*
duration
))
<<
" Gflop/s
\n
"
;
}
//std::this_thread::sleep_for(std::chrono::microseconds(1000000));
...
...
src/runtime/executor/cuquantum/cuquantum_executor.cu
View file @
f1c8ee3d
...
...
@@ -168,6 +168,9 @@ CuQuantumExecutor::~CuQuantumExecutor()
HANDLE_CTN_ERROR
(
cutensornetDestroy
((
cutensornetHandle_t
)(
gpu
.
second
.
cutn_handle
)));
}
std
::
cout
<<
"#DEBUG(exatn::runtime::CuQuantumExecutor): Destroyed cuTensorNet contexts for all available GPUs"
<<
std
::
endl
;
std
::
cout
<<
"#MSG(exatn::cuQuantum): Statistics across all GPU devices:
\n
"
;
std
::
cout
<<
" Number of Flops processed: "
<<
flops_
<<
std
::
endl
;
std
::
cout
<<
"#END_MSG
\n
"
;
gpu_attr_
.
clear
();
}
...
...
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