Skip to content

Commit

Permalink
Update test_nvml
Browse files Browse the repository at this point in the history
  • Loading branch information
csbnw committed Jan 6, 2025
1 parent b3bd224 commit d03c4fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_nvml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ TEST_CASE("Test nvml::Context", "[context]") { nvml::Context context; }

TEST_CASE("Test nvml::Device with device number", "[device]") {
nvml::Context context;
nvml::Device device(context, 0);
nvml::Device device(0);
}

TEST_CASE("Test nvml::Device::getClock", "[device]") {
nvml::Context context;
nvml::Device device(context, 0);
nvml::Device device(0);
const unsigned int clockMHz =
device.getClock(NVML_CLOCK_GRAPHICS, NVML_CLOCK_ID_CURRENT);
REQUIRE(clockMHz > 0);
}

TEST_CASE("Test nvml::Device::getPower", "[device]") {
nvml::Context context;
nvml::Device device(context, 0);
nvml::Device device(0);
const unsigned int power = device.getPower();
REQUIRE(power > 0);
}
Expand All @@ -31,5 +31,5 @@ TEST_CASE("Test nvml::Device with device", "[device]") {
cu::init();
cu::Device cu_device(0);
nvml::Context nvml_context;
nvml::Device nvml_device(nvml_context, cu_device);
nvml::Device nvml_device(cu_device);
}

0 comments on commit d03c4fd

Please sign in to comment.