Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions runtime/executor/test/backend_integration_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class StubBackend final : public BackendInterface {
FreeableBuffer*,
ArrayRef<CompileSpec>,
BackendInitContext&)>;
using ExecuteFn = std::function<Error(DelegateHandle*, EValue**)>;
using ExecuteFn =
std::function<Error(BackendExecutionContext&, DelegateHandle*, EValue**)>;
using DestroyFn = std::function<void(DelegateHandle*)>;

// Default name that this backend is registered as.
Expand Down Expand Up @@ -98,7 +99,7 @@ class StubBackend final : public BackendInterface {
DelegateHandle* handle,
EValue** args) const override {
if (execute_fn_) {
return execute_fn_.value()(handle, args);
return execute_fn_.value()(context, handle, args);
}
// Return a benign value otherwise.
return Error::Ok;
Expand Down Expand Up @@ -404,7 +405,9 @@ TEST_P(BackendIntegrationTest, EndToEndTestWithProcessedAsHandle) {
// FreeableBuffer.
DelegateHandle* execute_handle = nullptr;
StubBackend::singleton().install_execute(
[&](DelegateHandle* handle, ET_UNUSED EValue** args) -> Error {
[&](ET_UNUSED BackendExecutionContext& backend_execution_context,
DelegateHandle* handle,
ET_UNUSED EValue** args) -> Error {
execute_handle = handle;
auto* processed = reinterpret_cast<FreeableBuffer*>(handle);

Expand Down
Loading