Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
681830d1
Unverified
Commit
681830d1
authored
Dec 06, 2021
by
Thien Nguyen
Committed by
GitHub
Dec 06, 2021
Browse files
Merge pull request #503 from 1tnguyen/tnguyen/qlmaas-core-count
Limit QLM core count in power access mode (qlmaas)
parents
38665a08
dfea6290
Pipeline
#179085
passed with stage
in 12 minutes and 44 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
quantum/plugins/atos_qlm/accelerator/QlmAccelerator.in.cpp
View file @
681830d1
...
...
@@ -30,6 +30,8 @@ namespace {
// By default, this accelerator targets ORNL's QLM installation.
// It can be used w/ other QLM by providing the host address explicitly.
const
std
::
string
QLM_HOST_NAME
=
"quantumbull.ornl.gov"
;
// Remote access QLM (via qlmaas) limits the number of CPU threads.
constexpr
int
QLMAAS_MAX_CORE_COUNT
=
75
;
inline
bool
isMeasureGate
(
const
xacc
::
InstPtr
&
in_instr
)
{
return
(
in_instr
->
name
()
==
"Measure"
);
...
...
@@ -1010,7 +1012,7 @@ void QlmAccelerator::execute(
if
(
!
m_remoteAccess
)
{
return
m_qlmQpuServer
.
attr
(
"submit"
)(
qlmJob
);
}
else
{
auto
asynchronous_result
=
m_qlmQpuServer
.
attr
(
"submit"
)(
qlmJob
);
auto
asynchronous_result
=
m_qlmQpuServer
.
attr
(
"submit"
)(
qlmJob
,
"core_usage"
_a
=
QLMAAS_MAX_CORE_COUNT
);
// wait
auto
sync_result
=
asynchronous_result
.
attr
(
"join"
)();
return
sync_result
;
...
...
@@ -1039,7 +1041,7 @@ void QlmAccelerator::execute(
if
(
!
m_remoteAccess
)
{
return
m_qlmQpuServer
.
attr
(
"submit"
)(
qlmJob
);
}
else
{
auto
asynchronous_result
=
m_qlmQpuServer
.
attr
(
"submit"
)(
qlmJob
);
auto
asynchronous_result
=
m_qlmQpuServer
.
attr
(
"submit"
)(
qlmJob
,
"core_usage"
_a
=
QLMAAS_MAX_CORE_COUNT
);
// wait
auto
sync_result
=
asynchronous_result
.
attr
(
"join"
)();
return
sync_result
;
...
...
@@ -1068,7 +1070,7 @@ void QlmAccelerator::execute(
if
(
!
m_remoteAccess
)
{
return
m_qlmQpuServer
.
attr
(
"submit"
)(
batch
);
}
else
{
auto
asynchronous_result
=
m_qlmQpuServer
.
attr
(
"submit"
)(
batch
);
auto
asynchronous_result
=
m_qlmQpuServer
.
attr
(
"submit"
)(
batch
,
"core_usage"
_a
=
QLMAAS_MAX_CORE_COUNT
);
// wait
auto
sync_result
=
asynchronous_result
.
attr
(
"join"
)();
return
sync_result
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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