EXSWHTEC-4 - Implement printing of certain device information (#2884)

* Implement printing out of device count to standard output
* Implement printing out of device attributes retrieved by hipDeviceGetAttribute.
* Implement printing of device properties retrieved by hipGetDeviceProperties.
This commit is contained in:
Mirza Halilčević
2022-09-26 10:16:38 +02:00
committato da GitHub
parent 4afc7866b5
commit 8cb701166d
3 ha cambiato i file con 324 aggiunte e 8 eliminazioni
@@ -21,13 +21,16 @@ THE SOFTWARE.
*/ */
// Test the device info API extensions for HIP // Test the device info API extensions for HIP
#include <hip_test_common.hh>
#include <string.h> #include <string.h>
#ifdef __linux__ #ifdef __linux__
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <array>
#include <iostream> #include <iostream>
#include <hip_test_common.hh>
static hipError_t test_hipDeviceGetAttribute(int deviceId, static hipError_t test_hipDeviceGetAttribute(int deviceId,
hipDeviceAttribute_t attr, hipDeviceAttribute_t attr,
int expectedValue = -1) { int expectedValue = -1) {
@@ -366,3 +369,190 @@ TEST_CASE("Unit_hipDeviceGetAttribute_NegTst") {
device)); device));
} }
} }
template <size_t n>
using AttributeToStringMap = std::array<std::pair<hipDeviceAttribute_t, const char*>, n>;
namespace {
constexpr AttributeToStringMap<56> kCommonAttributes{{
{hipDeviceAttributeEccEnabled, "hipDeviceAttributeEccEnabled"},
{hipDeviceAttributeCanMapHostMemory, "hipDeviceAttributeCanMapHostMemory"},
{hipDeviceAttributeClockRate, "hipDeviceAttributeClockRate"},
{hipDeviceAttributeComputeMode, "hipDeviceAttributeComputeMode"},
{hipDeviceAttributeConcurrentKernels, "hipDeviceAttributeConcurrentKernels"},
{hipDeviceAttributeConcurrentManagedAccess, "hipDeviceAttributeConcurrentManagedAccess"},
{hipDeviceAttributeCooperativeLaunch, "hipDeviceAttributeCooperativeLaunch"},
{hipDeviceAttributeCooperativeMultiDeviceLaunch,
"hipDeviceAttributeCooperativeMultiDeviceLaunch"},
{hipDeviceAttributeDirectManagedMemAccessFromHost,
"hipDeviceAttributeDirectManagedMemAccessFromHost"},
{hipDeviceAttributeIntegrated, "hipDeviceAttributeIntegrated"},
{hipDeviceAttributeIsMultiGpuBoard, "hipDeviceAttributeIsMultiGpuBoard"},
{hipDeviceAttributeKernelExecTimeout, "hipDeviceAttributeKernelExecTimeout"},
{hipDeviceAttributeL2CacheSize, "hipDeviceAttributeL2CacheSize"},
{hipDeviceAttributeLocalL1CacheSupported, "hipDeviceAttributeLocalL1CacheSupported"},
{hipDeviceAttributeComputeCapabilityMajor, "hipDeviceAttributeComputeCapabilityMajor"},
{hipDeviceAttributeManagedMemory, "hipDeviceAttributeManagedMemory"},
{hipDeviceAttributeMaxBlockDimX, "hipDeviceAttributeMaxBlockDimX"},
{hipDeviceAttributeMaxBlockDimY, "hipDeviceAttributeMaxBlockDimY"},
{hipDeviceAttributeMaxBlockDimZ, "hipDeviceAttributeMaxBlockDimZ"},
{hipDeviceAttributeMaxGridDimX, "hipDeviceAttributeMaxGridDimX"},
{hipDeviceAttributeMaxGridDimY, "hipDeviceAttributeMaxGridDimY"},
{hipDeviceAttributeMaxGridDimZ, "hipDeviceAttributeMaxGridDimZ"},
{hipDeviceAttributeMaxSurface1D, "hipDeviceAttributeMaxSurface1D"},
{hipDeviceAttributeMaxSurface2D, "hipDeviceAttributeMaxSurface2D"},
{hipDeviceAttributeMaxSurface3D, "hipDeviceAttributeMaxSurface3D"},
{hipDeviceAttributeMaxTexture1DWidth, "hipDeviceAttributeMaxTexture1DWidth"},
{hipDeviceAttributeMaxTexture1DLinear, "hipDeviceAttributeMaxTexture1DLinear"},
{hipDeviceAttributeMaxTexture2DWidth, "hipDeviceAttributeMaxTexture2DWidth"},
{hipDeviceAttributeMaxTexture2DHeight, "hipDeviceAttributeMaxTexture2DHeight"},
{hipDeviceAttributeMaxTexture3DWidth, "hipDeviceAttributeMaxTexture3DWidth"},
{hipDeviceAttributeMaxTexture3DHeight, "hipDeviceAttributeMaxTexture3DHeight"},
{hipDeviceAttributeMaxTexture3DDepth, "hipDeviceAttributeMaxTexture3DDepth"},
{hipDeviceAttributeMaxThreadsDim, "hipDeviceAttributeMaxThreadsDim"},
{hipDeviceAttributeMaxThreadsPerBlock, "hipDeviceAttributeMaxThreadsPerBlock"},
{hipDeviceAttributeMaxThreadsPerMultiProcessor,
"hipDeviceAttributeMaxThreadsPerMultiProcessor"},
{hipDeviceAttributeMaxPitch, "hipDeviceAttributeMaxPitch"},
{hipDeviceAttributeMemoryBusWidth, "hipDeviceAttributeMemoryBusWidth"},
{hipDeviceAttributeMemoryClockRate, "hipDeviceAttributeMemoryClockRate"},
{hipDeviceAttributeComputeCapabilityMinor, "hipDeviceAttributeComputeCapabilityMinor"},
{hipDeviceAttributeMultiprocessorCount, "hipDeviceAttributeMultiprocessorCount"},
{hipDeviceAttributeName, "hipDeviceAttributeName"},
{hipDeviceAttributePageableMemoryAccess, "hipDeviceAttributePageableMemoryAccess"},
{hipDeviceAttributePageableMemoryAccessUsesHostPageTables,
"hipDeviceAttributePageableMemoryAccessUsesHostPageTables"},
{hipDeviceAttributePciBusId, "hipDeviceAttributePciBusId"},
{hipDeviceAttributePciDeviceId, "hipDeviceAttributePciDeviceId"},
{hipDeviceAttributePciDomainID, "hipDeviceAttributePciDomainID"},
{hipDeviceAttributeMaxRegistersPerBlock, "hipDeviceAttributeMaxRegistersPerBlock"},
{hipDeviceAttributeMaxRegistersPerMultiprocessor,
"hipDeviceAttributeMaxRegistersPerMultiprocessor"},
{hipDeviceAttributeMaxSharedMemoryPerBlock, "hipDeviceAttributeMaxSharedMemoryPerBlock"},
{hipDeviceAttributeTextureAlignment, "hipDeviceAttributeTextureAlignment"},
{hipDeviceAttributeTexturePitchAlignment, "hipDeviceAttributeTexturePitchAlignment"},
{hipDeviceAttributeTotalConstantMemory, "hipDeviceAttributeTotalConstantMemory"},
{hipDeviceAttributeTotalGlobalMem, "hipDeviceAttributeTotalGlobalMem"},
{hipDeviceAttributeWarpSize, "hipDeviceAttributeWarpSize"},
{hipDeviceAttributeMemoryPoolsSupported, "hipDeviceAttributeMemoryPoolsSupported"},
{hipDeviceAttributeVirtualMemoryManagementSupported,
"hipDeviceAttributeVirtualMemoryManagementSupported"}
}};
#if HT_NVIDIA
constexpr AttributeToStringMap<34> kCudaOnlyAttributes{
{{hipDeviceAttributeAccessPolicyMaxWindowSize, "hipDeviceAttributeAccessPolicyMaxWindowSize"},
{hipDeviceAttributeAsyncEngineCount, "hipDeviceAttributeAsyncEngineCount"},
{hipDeviceAttributeCanUseHostPointerForRegisteredMem,
"hipDeviceAttributeCanUseHostPointerForRegisteredMem"},
{hipDeviceAttributeComputePreemptionSupported, "hipDeviceAttributeComputePreemptionSupported"},
{hipDeviceAttributeDeviceOverlap, "hipDeviceAttributeDeviceOverlap"},
{hipDeviceAttributeGlobalL1CacheSupported, "hipDeviceAttributeGlobalL1CacheSupported"},
{hipDeviceAttributeHostNativeAtomicSupported, "hipDeviceAttributeHostNativeAtomicSupported"},
{hipDeviceAttributeLuid, "hipDeviceAttributeLuid"},
{hipDeviceAttributeLuidDeviceNodeMask, "hipDeviceAttributeLuidDeviceNodeMask"},
{hipDeviceAttributeMaxBlocksPerMultiProcessor, "hipDeviceAttributeMaxBlocksPerMultiProcessor"},
{hipDeviceAttributeMaxSurface1DLayered, "hipDeviceAttributeMaxSurface1DLayered"},
{hipDeviceAttributeMaxSurface2DLayered, "hipDeviceAttributeMaxSurface2DLayered"},
{hipDeviceAttributeMaxSurfaceCubemap, "hipDeviceAttributeMaxSurfaceCubemap"},
{hipDeviceAttributeMaxSurfaceCubemapLayered, "hipDeviceAttributeMaxSurfaceCubemapLayered"},
{hipDeviceAttributeMaxTexture1DLayered, "hipDeviceAttributeMaxTexture1DLayered"},
{hipDeviceAttributeMaxTexture1DMipmap, "hipDeviceAttributeMaxTexture1DMipmap"},
{hipDeviceAttributeMaxTexture2DGather, "hipDeviceAttributeMaxTexture2DGather"},
{hipDeviceAttributeMaxTexture2DLayered, "hipDeviceAttributeMaxTexture2DLayered"},
{hipDeviceAttributeMaxTexture2DLinear, "hipDeviceAttributeMaxTexture2DLinear"},
{hipDeviceAttributeMaxTexture2DMipmap, "hipDeviceAttributeMaxTexture2DMipmap"},
{hipDeviceAttributeMaxTexture3DAlt, "hipDeviceAttributeMaxTexture3DAlt"},
{hipDeviceAttributeMaxTextureCubemap, "hipDeviceAttributeMaxTextureCubemap"},
{hipDeviceAttributeMaxTextureCubemapLayered, "hipDeviceAttributeMaxTextureCubemapLayered"},
{hipDeviceAttributeMultiGpuBoardGroupID, "hipDeviceAttributeMultiGpuBoardGroupID"},
{hipDeviceAttributePersistingL2CacheMaxSize, "hipDeviceAttributePersistingL2CacheMaxSize"},
{hipDeviceAttributeReservedSharedMemPerBlock, "hipDeviceAttributeReservedSharedMemPerBlock"},
{hipDeviceAttributeSharedMemPerBlockOptin, "hipDeviceAttributeSharedMemPerBlockOptin"},
{hipDeviceAttributeSharedMemPerMultiprocessor, "hipDeviceAttributeSharedMemPerMultiprocessor"},
{hipDeviceAttributeSingleToDoublePrecisionPerfRatio,
"hipDeviceAttributeSingleToDoublePrecisionPerfRatio"},
{hipDeviceAttributeStreamPrioritiesSupported, "hipDeviceAttributeStreamPrioritiesSupported"},
{hipDeviceAttributeSurfaceAlignment, "hipDeviceAttributeSurfaceAlignment"},
{hipDeviceAttributeTccDriver, "hipDeviceAttributeTccDriver"},
{hipDeviceAttributeUnifiedAddressing, "hipDeviceAttributeUnifiedAddressing"},
{hipDeviceAttributeUuid, "hipDeviceAttributeUuid"}}};
#endif
#if HT_AMD
constexpr AttributeToStringMap<17> kAmdOnlyAttributes{{
{hipDeviceAttributeClockInstructionRate, "hipDeviceAttributeClockInstructionRate"},
{hipDeviceAttributeArch, "hipDeviceAttributeArch"},
{hipDeviceAttributeMaxSharedMemoryPerMultiprocessor,
"hipDeviceAttributeMaxSharedMemoryPerMultiprocessor"},
{hipDeviceAttributeGcnArch, "hipDeviceAttributeGcnArch"},
{hipDeviceAttributeGcnArchName, "hipDeviceAttributeGcnArchName"},
{hipDeviceAttributeHdpMemFlushCntl, "hipDeviceAttributeHdpMemFlushCntl"},
{hipDeviceAttributeHdpRegFlushCntl, "hipDeviceAttributeHdpRegFlushCntl"},
{hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc,
"hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc"},
{hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim,
"hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim"},
{hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim,
"hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim"},
{hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem,
"hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem"},
{hipDeviceAttributeIsLargeBar, "hipDeviceAttributeIsLargeBar"},
{hipDeviceAttributeAsicRevision, "hipDeviceAttributeAsicRevision"},
{hipDeviceAttributeCanUseStreamWaitValue, "hipDeviceAttributeCanUseStreamWaitValue"},
{hipDeviceAttributeImageSupport, "hipDeviceAttributeImageSupport"},
{hipDeviceAttributePhysicalMultiProcessorCount,
"hipDeviceAttributePhysicalMultiProcessorCount"},
{hipDeviceAttributeFineGrainSupport, "hipDeviceAttributeFineGrainSupport"}
// {hipDeviceAttributeWallClockRate, "hipDeviceAttributeWallClockRate"}
}};
#endif
constexpr int kW = 60;
} // anonymous namespace
template <size_t n> void printAttributes(const AttributeToStringMap<n>& attributes, const int device) {
int attribute_value;
hipError_t ret_val;
for (const auto& attribute : attributes) {
ret_val = hipDeviceGetAttribute(&attribute_value, attribute.first, device);
std::cout << std::setw(kW) << std::string(attribute.second).append(": ");
if (ret_val == hipSuccess)
std::cout << attribute_value << "\n";
else
std::cout << "unsupported\n";
}
std::flush(std::cout);
}
TEST_CASE("Print_Out_Attributes") {
const auto device = GENERATE(range(0, HipTest::getDeviceCount()));
hipDeviceProp_t properties;
HIP_CHECK(hipGetDeviceProperties(&properties, device));
std::cout << std::left;
std::cout << std::setw(kW) << "device#: " << device << "\n";
std::cout << std::setw(kW) << "name: " << properties.name << "\n";
printAttributes(kCommonAttributes, device);
#if HT_NVIDIA
std::cout << "\nCUDA only\n";
std::cout << std::setw(kW)
<< "--------------------------------------------------------------------------------"
<< "\n";
printAttributes(kCudaOnlyAttributes, device);
#endif
#if HT_AMD
std::cout << "\nAMD only\n";
std::cout << std::setw(kW)
<< "--------------------------------------------------------------------------------"
<< "\n";
printAttributes(kAmdOnlyAttributes, device);
#endif
std::flush(std::cout);
}
@@ -1,19 +1,22 @@
/* /*
Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANNTY OF ANY KIND, EXPRESS OR
IMPLIED, INNCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
FITNNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANNY CLAIM, DAMAGES OR OTHER FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
@@ -55,3 +58,7 @@ TEST_CASE("Unit_hipGetDeviceCount_HideDevices") {
REQUIRE(proc.run(visibleStr) == i); REQUIRE(proc.run(visibleStr) == i);
} }
} }
TEST_CASE("Print_Out_Device_Count") {
std::cout << "Device Count: " << HipTest::getDeviceCount() << std::endl;
}
@@ -199,3 +199,122 @@ TEST_CASE("Unit_hipGetDeviceProperties_NegTst") {
REQUIRE_FALSE(hipSuccess == hipGetDeviceProperties(&prop, deviceCount)); REQUIRE_FALSE(hipSuccess == hipGetDeviceProperties(&prop, deviceCount));
} }
} }
TEST_CASE("Print_Out_Properties") {
constexpr int w = 42;
const auto device = GENERATE(range(0, HipTest::getDeviceCount()));
hipDeviceProp_t properties;
HIP_CHECK(hipGetDeviceProperties(&properties, device));
std::cout << std::left;
std::cout << std::setw(w) << "device#: " << device << "\n";
std::cout << std::setw(w) << "name: " << std::string(properties.name, 256) << "\n";
std::cout << std::setw(w) << "totalGlobalMem: " << properties.totalGlobalMem << "\n";
std::cout << std::setw(w) << "sharedMemPerBlock: " << properties.sharedMemPerBlock << "\n";
std::cout << std::setw(w) << "regsPerBlock: " << properties.regsPerBlock << "\n";
std::cout << std::setw(w) << "warpSize: " << properties.warpSize << "\n";
std::cout << std::setw(w) << "maxThreadsPerBlock: " << properties.maxThreadsPerBlock << "\n";
std::cout << std::setw(w) << "maxThreadsDim.x: " << properties.maxThreadsDim[0] << "\n";
std::cout << std::setw(w) << "maxThreadsDim.y: " << properties.maxThreadsDim[1] << "\n";
std::cout << std::setw(w) << "maxThreadsDim.z: " << properties.maxThreadsDim[2] << "\n";
std::cout << std::setw(w) << "maxGridSize.x: " << properties.maxGridSize[0] << "\n";
std::cout << std::setw(w) << "maxGridSize.y: " << properties.maxGridSize[1] << "\n";
std::cout << std::setw(w) << "maxGridSize.z: " << properties.maxGridSize[2] << "\n";
std::cout << std::setw(w) << "clockRate: " << properties.clockRate << "\n";
std::cout << std::setw(w) << "memoryClockRate: " << properties.memoryClockRate << "\n";
std::cout << std::setw(w) << "memoryBusWidth: " << properties.memoryBusWidth << "\n";
std::cout << std::setw(w) << "totalConstMem: " << properties.totalConstMem << "\n";
std::cout << std::setw(w) << "major: " << properties.major << "\n";
std::cout << std::setw(w) << "minor: " << properties.minor << "\n";
std::cout << std::setw(w) << "multiProcessorCount: " << properties.multiProcessorCount << "\n";
std::cout << std::setw(w) << "l2CacheSize: " << properties.l2CacheSize << "\n";
std::cout << std::setw(w)
<< "maxThreadsPerMultiProcessor: " << properties.maxThreadsPerMultiProcessor << "\n";
std::cout << std::setw(w) << "computeMode: " << properties.computeMode << "\n";
std::cout << std::setw(w) << "concurrentKernels: " << properties.concurrentKernels << "\n";
std::cout << std::setw(w) << "pciDomainID: " << properties.pciDomainID << "\n";
std::cout << std::setw(w) << "pciBusID: " << properties.pciBusID << "\n";
std::cout << std::setw(w) << "pciDeviceID: " << properties.pciDeviceID << "\n";
std::cout << std::setw(w) << "isMultiGpuBoard: " << properties.isMultiGpuBoard << "\n";
std::cout << std::setw(w) << "canMapHostMemory: " << properties.canMapHostMemory << "\n";
std::cout << std::setw(w) << "integrated: " << properties.integrated << "\n";
std::cout << std::setw(w) << "cooperativeLaunch: " << properties.cooperativeLaunch << "\n";
std::cout << std::setw(w)
<< "cooperativeMultiDeviceLaunch: " << properties.cooperativeMultiDeviceLaunch << "\n";
std::cout << std::setw(w) << "maxTexture1DLinear: " << properties.maxTexture1DLinear << "\n";
std::cout << std::setw(w) << "maxTexture1D: " << properties.maxTexture1D << "\n";
std::cout << std::setw(w) << "maxTexture2D.width: " << properties.maxTexture2D[0] << "\n";
std::cout << std::setw(w) << "maxTexture2D.height: " << properties.maxTexture2D[1] << "\n";
std::cout << std::setw(w) << "maxTexture3D.width: " << properties.maxTexture3D[0] << "\n";
std::cout << std::setw(w) << "maxTexture3D.height: " << properties.maxTexture3D[1] << "\n";
std::cout << std::setw(w) << "maxTexture3D.depth: " << properties.maxTexture3D[2] << "\n";
std::cout << std::setw(w) << "memPitch: " << properties.memPitch << "\n";
std::cout << std::setw(w) << "textureAlignment: " << properties.textureAlignment << "\n";
std::cout << std::setw(w) << "texturePitchAlignment: " << properties.texturePitchAlignment
<< "\n";
std::cout << std::setw(w) << "kernelExecTimeoutEnabled: " << properties.kernelExecTimeoutEnabled
<< "\n";
std::cout << std::setw(w) << "ECCEnabled: " << properties.ECCEnabled << "\n";
std::cout << std::setw(w) << "tccDriver: " << properties.tccDriver << "\n";
std::cout << std::setw(w) << "managedMemory: " << properties.managedMemory << "\n";
std::cout << std::setw(w)
<< "directManagedMemAccessFromHost: " << properties.directManagedMemAccessFromHost
<< "\n";
std::cout << std::setw(w) << "concurrentManagedAccess: " << properties.concurrentManagedAccess
<< "\n";
std::cout << std::setw(w) << "pageableMemoryAccess: " << properties.pageableMemoryAccess << "\n";
std::cout << std::setw(w) << "pageableMemoryAccessUsesHostPageTables: "
<< properties.pageableMemoryAccessUsesHostPageTables << "\n";
#if HT_AMD
std::cout << std::setw(w) << "gcnArch: " << properties.gcnArch << "\n";
std::cout << std::setw(w) << "gcnArchName: " << std::string(properties.gcnArchName, 256) << "\n";
std::cout << std::setw(w) << "asicRevision: " << properties.asicRevision << "\n";
std::cout << std::setw(w)
<< "arch.hasGlobalInt32Atomics: " << properties.arch.hasGlobalInt32Atomics << "\n";
std::cout << std::setw(w)
<< "arch.hasGlobalFloatAtomicExch: " << properties.arch.hasGlobalFloatAtomicExch
<< "\n";
std::cout << std::setw(w)
<< "arch.hasSharedInt32Atomics: " << properties.arch.hasSharedInt32Atomics << "\n";
std::cout << std::setw(w)
<< "arch.hasSharedFloatAtomicExch: " << properties.arch.hasSharedFloatAtomicExch
<< "\n";
std::cout << std::setw(w) << "arch.hasFloatAtomicAdd: " << properties.arch.hasFloatAtomicAdd
<< "\n";
std::cout << std::setw(w)
<< "arch.hasGlobalInt64Atomics: " << properties.arch.hasGlobalInt64Atomics << "\n";
std::cout << std::setw(w)
<< "arch.hasSharedInt64Atomics: " << properties.arch.hasSharedInt64Atomics << "\n";
std::cout << std::setw(w) << "arch.hasDoubles: " << properties.arch.hasDoubles << "\n";
std::cout << std::setw(w) << "arch.hasWarpVote: " << properties.arch.hasWarpVote << "\n";
std::cout << std::setw(w) << "arch.hasWarpBallot: " << properties.arch.hasWarpBallot << "\n";
std::cout << std::setw(w) << "arch.hasWarpShuffle: " << properties.arch.hasWarpShuffle << "\n";
std::cout << std::setw(w) << "arch.hasFunnelShift: " << properties.arch.hasFunnelShift << "\n";
std::cout << std::setw(w) << "arch.hasThreadFenceSystem: " << properties.arch.hasThreadFenceSystem
<< "\n";
std::cout << std::setw(w) << "arch.hasSyncThreadsExt: " << properties.arch.hasSyncThreadsExt
<< "\n";
std::cout << std::setw(w) << "arch.hasSurfaceFuncs: " << properties.arch.hasSurfaceFuncs << "\n";
std::cout << std::setw(w) << "arch.has3dGrid: " << properties.arch.has3dGrid << "\n";
std::cout << std::setw(w)
<< "arch.hasDynamicParallelism: " << properties.arch.hasDynamicParallelism << "\n";
std::cout << std::setw(w) << "isLargeBar: " << properties.isLargeBar << "\n";
std::cout << std::setw(w)
<< "maxSharedMemoryPerMultiProcessor: " << properties.maxSharedMemoryPerMultiProcessor
<< "\n";
std::cout << std::setw(w) << "hdpMemFlushCntl: " << properties.hdpMemFlushCntl << "\n";
std::cout << std::setw(w) << "hdpRegFlushCntl: " << properties.hdpRegFlushCntl << "\n";
std::cout << std::setw(w) << "clockInstructionRate: " << properties.clockInstructionRate << "\n";
std::cout << std::setw(w) << "cooperativeMultiDeviceUnmatchedFunc: "
<< properties.cooperativeMultiDeviceUnmatchedFunc << "\n";
std::cout << std::setw(w) << "cooperativeMultiDeviceUnmatchedGridDim: "
<< properties.cooperativeMultiDeviceUnmatchedGridDim << "\n";
std::cout << std::setw(w) << "cooperativeMultiDeviceUnmatchedBlockDim: "
<< properties.cooperativeMultiDeviceUnmatchedBlockDim << "\n";
std::cout << std::setw(w) << "cooperativeMultiDeviceUnmatchedSharedMem: "
<< properties.cooperativeMultiDeviceUnmatchedSharedMem << "\n";
#endif
std::flush(std::cout);
}