Skip to content

Commit

Permalink
Correctly set source and binary filenames when building a launchedKer…
Browse files Browse the repository at this point in the history
…nel. (#666)
  • Loading branch information
kris-rowe authored Mar 24, 2023
1 parent 484c8d1 commit 5790d72
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/occa/internal/core/launchedDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ namespace occa {
<< "] in [" << binaryFilename << "]\n";
}

modeKernel_t* k;
if (usingOkl) {
lang::sourceMetadata_t launcherMetadata = (
lang::sourceMetadata_t::fromBuildFile(hashDir + kc::launcherBuildFile)
);
lang::sourceMetadata_t deviceMetadata = (
lang::sourceMetadata_t::fromBuildFile(hashDir + kc::buildFile)
);
return buildOKLKernelFromBinary(kernelHash,
k = buildOKLKernelFromBinary(kernelHash,
hashDir,
kernelName,
sourceFilename,
Expand All @@ -123,10 +124,15 @@ namespace occa {
deviceMetadata,
kernelProps);
} else {
return buildKernelFromBinary(binaryFilename,
k = buildKernelFromBinary(binaryFilename,
kernelName,
kernelProps);
}
if (k) {
k->sourceFilename = filename;
k->binaryFilename = binaryFilename;
}
return k;
}

lang::sourceMetadata_t launcherMetadata, deviceMetadata;
Expand Down Expand Up @@ -200,6 +206,10 @@ namespace occa {
}
);

if (k) {
k->sourceFilename = filename;
k->binaryFilename = binaryFilename;
}
return k;
}

Expand Down

0 comments on commit 5790d72

Please sign in to comment.