Skip to content

Commit

Permalink
placeholders for shadow var bind
Browse files Browse the repository at this point in the history
  • Loading branch information
pvelesko committed Oct 19, 2024
1 parent f0d2cd9 commit 209add7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CHIPBackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ static void queueVariableInitShadowKernel(chipstar::Queue *Q,
queueKernel(Q, K);
}

static void initDeviceHeap(chipstar::Queue &Q, chipstar::Module &M) {
logTrace("initDeviceHeap()");
chipstar::DeviceVar *Var = M.getGlobalVar(ChipDeviceHeapName);
if (!Var)
return;
void* device_heap = Var->getDevAddr();
// TODO: initialize device heap by enqueuing a kernel that calls init_device_heap
// prob call queueVariableInfoShadowKernel
}

chipstar::CallbackData::CallbackData(hipStreamCallback_t TheCallbackF,
void *TheCallbackArgs,
chipstar::Queue *TheChipQueue)
Expand Down
3 changes: 3 additions & 0 deletions src/common.hh
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,7 @@ constexpr char ChipSpilledArgsVarPrefix[] = "__chip_spilled_args_";
/// the abort() function was called by a kernel.
constexpr char ChipDeviceAbortFlagName[] = "__chipspv_abort_called";

/// The name of a global variable which is the device heap.
constexpr char ChipDeviceHeapName[] = "__chipspv_device_heap";

#endif

0 comments on commit 209add7

Please sign in to comment.