Skip to content

Commit

Permalink
ocl: adjusted internal settings
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Dec 6, 2024
1 parent 718c1cd commit 5a749a4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/acc/opencl/acc_opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,18 +344,22 @@ int c_dbcsr_acc_init(void) {
# if defined(ACC_OPENCL_NCCS)
if ((1 & c_dbcsr_acc_opencl_config.wa) && 0 != nccs && NULL == getenv("ZEX_NUMBER_OF_CCS")) {
static char zex_nccs[ACC_OPENCL_MAXNDEVS * 8 + 32] = "ZEX_NUMBER_OF_CCS=";
const int mode = ((1 == nccs || 2 == nccs) ? nccs : 4);
int j = strlen(zex_nccs);
for (i = 0; i < ACC_OPENCL_MAXNDEVS; ++i) {
const char* const istr = (0 < i ? ",%u:%i" : "%u:%i");
const int n = LIBXSMM_SNPRINTF(zex_nccs + j, sizeof(zex_nccs) - j, istr, i, LIBXSMM_CLMP(nccs, 1, 4));
const int n = LIBXSMM_SNPRINTF(zex_nccs + j, sizeof(zex_nccs) - j, istr, i, mode);
if (0 < n) j += n;
else {
j = 0;
break;
}
}
/* environment is populated before touching the compute runtime */
if (0 < j) ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(zex_nccs)); /* soft-error */
if (0 < j && 0 == LIBXSMM_PUTENV(zex_nccs) && /* populate before touching the compute runtime */
(2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity))
{
fprintf(stderr, "INFO ACC/OpenCL: support multiple separate compute command streamers (%i-CCS mode)\n", mode);
}
}
assert(EXIT_SUCCESS == result);
# endif
Expand All @@ -379,7 +383,7 @@ int c_dbcsr_acc_init(void) {
}
assert(EXIT_SUCCESS == result);
# endif
if (~(1 + 2) & c_dbcsr_acc_opencl_config.wa) { /* environment is populated before touching the compute runtime */
if (~(1 + 2 + 32) & c_dbcsr_acc_opencl_config.wa) { /* environment is populated before touching the compute runtime */
static char a[] = "NEOReadDebugKeys=1", b[] = "ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE", c[] = "EnableRecoverablePageFaults=0";
static char d[] = "DirectSubmissionOverrideBlitterSupport=0", *key_value[] = {a, b, c, d};
if (NULL == env_neo) ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(key_value[0]));
Expand Down

0 comments on commit 5a749a4

Please sign in to comment.