code will work on the AMD Bulldozer and Piledriver processors, it is significantly less
efficient than the ``AVX_128_FMA`` choice above - do not be fooled
to assume that 256 is better than 128 in this case.
-6. ``AVX2_128`` AMD Zen microarchitecture processors (2017);
+6. ``AVX2_128`` AMD Zen/Zen2 and Hygon Dhyana microarchitecture processors;
it will enable AVX2 with 3-way fused multiply-add instructions.
- While the Zen microarchitecture does support 256-bit AVX2 instructions,
+ While these microarchitectures do support 256-bit AVX2 instructions,
hence ``AVX2_256`` is also supported, 128-bit will generally be faster,
in particular when the non-bonded tasks run on the CPU -- hence
the default ``AVX2_128``. With GPU offload however ``AVX2_256``
Also, please use the syntax :issue:`number` to reference issues on redmine, without the
a space between the colon and number!
+Added support for Hygon Dhyana CPU architecture
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+Support for hardware detection and related heuristics has been implemented
+for the Hygon Dhyana derived from the first-gen AMD Zen which it shares most
+of its architectural details with.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*! \brief Detect x86 vendors by using the cpuid assembly instructions
*
- * If support for the cpuid instruction is present, we check for Intel
- * or AMD vendors.
+ * If support for the cpuid instruction is present, we check for Intel,
+ * AMD or Hygon vendors
*
- * \return gmx::CpuInfo::Vendor::Intel, gmx::CpuInfo::Vendor::Amd. If neither
- * Intel nor Amd can be identified, or if the code fails to execute,
+ * \return gmx::CpuInfo::Vendor::Intel, gmx::CpuInfo::Vendor::Amd,
+ * gmx::CpuInfl::Vendor::Hygon, . If neither Intel, Amd nor
+ * Hygon can be identified, or if the code fails to execute,
* gmx::CpuInfo::Vendor::Unknown is returned.
*/
CpuInfo::Vendor
{
v = CpuInfo::Vendor::Amd; // ebx=='htuA', ecx=='DMAc', edx=='itne'
}
+ else if (ebx == 0x6f677948 && ecx == 0x656e6975 && edx == 0x6e65476e)
+ {
+ v = CpuInfo::Vendor::Hygon; // ebx=='ogyH', ecx=='eniu', edx=='neGn'
+ }
}
return v;
}
}
else // haveApic
{
- if (detectX86Vendor() == CpuInfo::Vendor::Amd)
+ if (detectX86Vendor() == CpuInfo::Vendor::Amd ||
+ detectX86Vendor() == CpuInfo::Vendor::Hygon)
{
layout = detectAmdApicIdLayout(maxExtLevel);
{ "IBM", CpuInfo::Vendor::Ibm },
{ "POWER", CpuInfo::Vendor::Ibm },
{ "Oracle", CpuInfo::Vendor::Oracle },
+ { "HygonGenuine", CpuInfo::Vendor::Hygon },
+ { "Hygon", CpuInfo::Vendor::Hygon },
};
// For each label in /proc/cpuinfo, compare the value to the name in the
{
result.features_.insert(CpuInfo::Feature::X86_Amd);
}
+ else if (result.vendor_ == CpuInfo::Vendor::Hygon)
+ {
+ result.features_.insert(CpuInfo::Feature::X86_Hygon);
+ }
detectX86Features(&result.brandString_, &result.family_, &result.model_,
&result.stepping_, &result.features_);
result.logicalProcessors_ = detectX86LogicalProcessors();
{ Vendor::Ibm, "IBM" },
{ Vendor::Arm, "ARM" },
{ Vendor::Oracle, "Oracle" },
+ { Vendor::Hygon, "Hygon" },
};
return vendorStrings.at(vendor_);
{ Feature::Ibm_Qpx, "qpx" },
{ Feature::Ibm_Vmx, "vmx" },
{ Feature::Ibm_Vsx, "vsx" },
- { Feature::Fujitsu_HpcAce, "hpc-ace" }
+ { Feature::Fujitsu_HpcAce, "hpc-ace" },
+ { Feature::X86_Hygon, "hygon" }
};
return featureStrings.at(f);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
Ibm, //!< Only works on Linux (parsed from /proc/cpuinfo)
Arm, //!< Only works on Linux (parsed from /proc/cpuinfo)
Oracle, //!< Cannot detect anything else yet (no /proc/cpuinfo available)
+ Hygon, //!< HygonGenuine
};
/*! \brief List of CPU features
Ibm_Qpx, //!< IBM QPX SIMD (BlueGene/Q)
Ibm_Vmx, //!< IBM VMX SIMD (Altivec on Power6 and later)
Ibm_Vsx, //!< IBM VSX SIMD (Power7 and later)
- Fujitsu_HpcAce //!< Fujitsu Sparc64 HPC-ACE
+ Fujitsu_HpcAce, //!< Fujitsu Sparc64 HPC-ACE
+ X86_Hygon //!< This is a Hygon x86 processor
};
/*! \libinternal \brief Entry with basic information for a single logical processor */
const PhysicalNodeCommunicator &physicalNodeComm)
{
const int ncore = hwinfo_g->hardwareTopology->numberOfCores();
- /* Zen has family=23, for now we treat future AMD CPUs like Zen */
- const bool cpuIsAmdZen = (cpuInfo.vendor() == CpuInfo::Vendor::Amd &&
- cpuInfo.family() >= 23);
+ /* Zen has family=23, for now we treat future AMD CPUs like Zen
+ * and Hygon Dhyana like Zen */
+ const bool cpuIsAmdZen = ((cpuInfo.vendor() == CpuInfo::Vendor::Amd &&
+ cpuInfo.family() >= 23) ||
+ cpuInfo.vendor() == CpuInfo::Vendor::Hygon);
+ ;
#if GMX_LIB_MPI
int nhwthread, ngpu, i;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2019, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
int simd_suggest_max; /* Highest SIMD instruction set supported by at least one rank */
gmx_bool bIdenticalGPUs; /* TRUE if all ranks have the same type(s) and order of GPUs */
- bool haveAmdZenCpu; /* TRUE when at least one CPU in any of the nodes is AMD Zen */
+ bool haveAmdZenCpu; /* TRUE when at least one CPU in any of the nodes is AMD Zen arch */
};
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
break;
case CpuInfo::Vendor::Amd:
+ case CpuInfo::Vendor::Hygon:
if (c.feature(CpuInfo::Feature::X86_Avx2))
{
// AMD Ryzen supports 256-bit AVX2, but performs better with 128-bit
// Intel Nehalem
nth = nthreads_omp_faster_Nehalem;
}
- else if (cpuInfo.vendor() == gmx::CpuInfo::Vendor::Amd && cpuInfo.family() >= 23)
+ else if ((cpuInfo.vendor() == gmx::CpuInfo::Vendor::Amd && cpuInfo.family() >= 23) ||
+ cpuInfo.vendor() == gmx::CpuInfo::Vendor::Hygon)
{
- // AMD Ryzen
+ // AMD Ryzen || Hygon Dhyana
nth = nthreads_omp_faster_AMD_Ryzen;
}
else