Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
koparasy committed Dec 18, 2024
1 parent 1b5660c commit a8ca0b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/JitEngineDevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class JITKernelInfo {
const auto &getRCIndices() const { return RCIndices; }
const auto &getRCTypes() const { return RCTypes; }
const auto &getNumRCs() const { return NumRCs; }
const auto &getSHA256() const { return SHA256; }
};

struct FatbinWrapper_t {
Expand Down Expand Up @@ -545,7 +546,7 @@ JitEngineDevice<ImplT>::compileAndRun(
: extractDeviceBitcode(KernelName, Kernel);

// I have already read the LLVM IR from the Binary. Pick the Static Hash
auto StaticHash = SHA256HashWithBitcodes[Index].first;
auto StaticHash = JITKernelInfoMap[Kernel].getSHA256();
// TODO: This does not include the GridDims/BlockDims. We need to fix it.
auto PersistentHash = ProteusDeviceBinHash;
uint64_t DynamicHashValue =
Expand All @@ -554,7 +555,7 @@ JitEngineDevice<ImplT>::compileAndRun(
KernelFunc = CodeCache.lookup(DynamicHashValue);
std::cout << " Function with name " << KernelName.str() << "at address "
<< Kernel << " has PersistentHash " << PersistentHash
<< " Static Hash:" << StaticHash
<< " Static Hash:" << StaticHash.str()
<< " Dynamic Hash:" << DynamicHashValue << "\n";

// We found the kernel, execute
Expand Down

0 comments on commit a8ca0b1

Please sign in to comment.