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 8764ee1 commit 4bb6fc8
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 @@ -77,6 +77,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 @@ -534,7 +535,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 @@ -543,7 +544,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 4bb6fc8

Please sign in to comment.