Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:50:28

0001 // Catch2 headers
0002 #define CATCH_CONFIG_MAIN
0003 #include <catch.hpp>
0004 
0005 // ROCm headers
0006 #include <hip/hip_runtime.h>
0007 
0008 // CMSSW headers
0009 #include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
0010 #include "HeterogeneousCore/ROCmUtilities/interface/requireDevices.h"
0011 
0012 TEST_CASE("HeterogeneousCore/ROCmUtilities testRequireROCmDevices", "[testRequireROCmDevices]") {
0013   SECTION("Test requireDevices()") {
0014     cms::rocmtest::requireDevices();
0015 
0016     int devices = 0;
0017     hipCheck(hipGetDeviceCount(&devices));
0018 
0019     REQUIRE(devices > 0);
0020   }
0021 }