identify offloading to Xeon Phi accelerator coprocessors
This commit is contained in:
@ -1442,9 +1442,10 @@ class lammps(object):
|
|||||||
|
|
||||||
This is a wrapper around the :cpp:func:`lammps_config_accelerator`
|
This is a wrapper around the :cpp:func:`lammps_config_accelerator`
|
||||||
function of the library interface which loops over all known packages
|
function of the library interface which loops over all known packages
|
||||||
and settings and returns enabled features as a nested dictionary.
|
and categories and returns enabled features as a nested dictionary
|
||||||
|
with all enabled settings as list of strings.
|
||||||
|
|
||||||
:return: nested dictionary with all known enabled settings
|
:return: nested dictionary with all known enabled settings as list of strings
|
||||||
:rtype: dictionary
|
:rtype: dictionary
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1453,7 +1454,7 @@ class lammps(object):
|
|||||||
result[p] = {}
|
result[p] = {}
|
||||||
c = 'api'
|
c = 'api'
|
||||||
result[p][c] = []
|
result[p][c] = []
|
||||||
for s in ['cuda', 'hip', 'pthreads', 'opencl', 'openmp', 'serial']:
|
for s in ['cuda', 'hip', 'phi', 'pthreads', 'opencl', 'openmp', 'serial']:
|
||||||
if self.lib.lammps_config_accelerator(p.encode(),c.encode(),s.encode()):
|
if self.lib.lammps_config_accelerator(p.encode(),c.encode(),s.encode()):
|
||||||
result[p][c].append(s)
|
result[p][c].append(s)
|
||||||
c = 'precision'
|
c = 'precision'
|
||||||
|
|||||||
@ -360,7 +360,7 @@ void Info::command(int narg, char **arg)
|
|||||||
}
|
}
|
||||||
if (has_package("USER-INTEL")) {
|
if (has_package("USER-INTEL")) {
|
||||||
mesg = "USER-INTEL package API:";
|
mesg = "USER-INTEL package API:";
|
||||||
if (has_accelerator_feature("USER-INTEL","api","knl")) mesg += " KNL";
|
if (has_accelerator_feature("USER-INTEL","api","phi")) mesg += " Phi";
|
||||||
if (has_accelerator_feature("USER-INTEL","api","openmp")) mesg += " OpenMP";
|
if (has_accelerator_feature("USER-INTEL","api","openmp")) mesg += " OpenMP";
|
||||||
mesg += "\nUSER-INTEL package precision:";
|
mesg += "\nUSER-INTEL package precision:";
|
||||||
if (has_accelerator_feature("USER-INTEL","precision","single")) mesg += " single";
|
if (has_accelerator_feature("USER-INTEL","precision","single")) mesg += " single";
|
||||||
@ -1254,7 +1254,9 @@ bool Info::has_accelerator_feature(const std::string &package,
|
|||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
if (category == "api") {
|
if (category == "api") {
|
||||||
#if defined(_OPENMP)
|
#if defined(LMP_INTEL_OFFLOAD)
|
||||||
|
if (setting == "phi") return true;
|
||||||
|
#elif defined(_OPENMP)
|
||||||
if (setting == "openmp") return true;
|
if (setting == "openmp") return true;
|
||||||
#else
|
#else
|
||||||
if (setting == "serial") return true;
|
if (setting == "serial") return true;
|
||||||
|
|||||||
@ -4309,8 +4309,8 @@ int lammps_config_package_name(int idx, char *buffer, int buf_size) {
|
|||||||
This function checks availability of compile time settings of included
|
This function checks availability of compile time settings of included
|
||||||
:doc:`accelerator packages <Speed_packages>` in LAMMPS.
|
:doc:`accelerator packages <Speed_packages>` in LAMMPS.
|
||||||
Supported packages names are "GPU", "KOKKOS", "USER-INTEL", and "USER-OMP".
|
Supported packages names are "GPU", "KOKKOS", "USER-INTEL", and "USER-OMP".
|
||||||
Supported categories are "api" with possible settings "cuda", "hip", "knl",
|
Supported categories are "api" with possible settings "cuda", "hip", "phi",
|
||||||
"pthreads", "opencl", "openmp", and "none", and "precision" with
|
"pthreads", "opencl", "openmp", and "serial", and "precision" with
|
||||||
possible settings "double", "mixed", and "single". If the combination
|
possible settings "double", "mixed", and "single". If the combination
|
||||||
of package, category, and setting is available, the function returns 1,
|
of package, category, and setting is available, the function returns 1,
|
||||||
otherwise 0.
|
otherwise 0.
|
||||||
|
|||||||
Reference in New Issue
Block a user