Skip to content

Commit

Permalink
ocl: always print number of devices found
Browse files Browse the repository at this point in the history
* Using the CUDA backend, ACC_OPENCL_VERBOSE is not available.
* Prints the activated device and number of found devices.
* Helps, e.g., CI to capture basic information.
  • Loading branch information
hfp committed May 29, 2024
1 parent 5b1f7fe commit 6f1065d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/acc/acc_bench_smm.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ int main(int argc, char* argv[]) {
int ndevices = 0;
result = c_dbcsr_acc_get_ndevices(&ndevices);
if (0 < ndevices && (0 == device || EXIT_SUCCESS == c_dbcsr_acc_set_active_device(device))) {
#if defined(_DEBUG)
fprintf(stderr, "Activated device %i of %i (device%i).\n", device + 1, ndevices, device);
#endif
PRINTF("Activated device%i (ndevices=%i)\n", device, ndevices);
}
else {
if (0 >= ndevices) {
Expand Down
4 changes: 1 addition & 3 deletions src/acc/acc_bench_trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ int main(int argc, char* argv[]) {
if (EXIT_SUCCESS == result) {
result = c_dbcsr_acc_get_ndevices(&ndevices);
if (0 < ndevices && (0 == device || EXIT_SUCCESS == c_dbcsr_acc_set_active_device(device))) {
#if defined(_DEBUG)
fprintf(stderr, "Activated device %i of %i (device%i).\n", device + 1, ndevices, device);
#endif
printf("Activated device%i (ndevices=%i)\n", device, ndevices);
}
else {
if (0 >= ndevices) {
Expand Down

0 comments on commit 6f1065d

Please sign in to comment.