Skip to content

Remove memref runtime dependency and generate descriptors at compile time - #2635

Merged
asaadaldien merged 1 commit into
mainfrom
ataei-remove_memref_runtile
Jul 23, 2020
Merged

asaadaldien merged 1 commit into
mainfrom
ataei-remove_memref_runtile

Conversation

@asaadaldien

@asaadaldien asaadaldien commented Jul 23, 2020 •

Copy link
Copy Markdown
Contributor

At runtime buffers don't have shape or stride information to construct memref descriptors, so the runtime should only pass raw_ptr & push_constant and the generated code must generate well formed descriptors.

This is done as the following:

  • Entry point invocation ABI for dylib and llvmjit runtime void foo(void** packed_buffer_args, int64_t* push_constant)
  • LLVMIR entry point function generated func foo(%packed_buffer_args: !<i8**>, %push_constant: !llvm<i64*>)
  • Delay the construction of entry function signature to final LLVM lowering step.
  • A pattern that lowers iree.placeholder and hal.interface.load_constant` to LLVMIR.
  • Replace iree.placeholder ops with inferred memref descriptors.
  • Replace hal.interface.load_constant with llvm.load
  • Remove HALInterfaceToMemrefArguments pass.
  • Remove memre_runtime.h
  • Remove dead code related to inovke_ and emit_c_interface

@google-cla google-cla Bot added the cla: yes label Jul 23, 2020
@asaadaldien asaadaldien linked an issue Jul 23, 2020 that may be closed by this pull request

@benvanik benvanik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic cleanup!

@asaadaldien
asaadaldien force-pushed the ataei-remove_memref_runtile branch from 013b07b to 4e5080f Compare July 23, 2020 19:14
@asaadaldien
asaadaldien force-pushed the ataei-remove_memref_runtile branch from 4e5080f to c968e25 Compare July 23, 2020 20:49
@asaadaldien
asaadaldien merged commit 27f4f61 into main Jul 23, 2020
@asaadaldien
asaadaldien deleted the ataei-remove_memref_runtile branch July 23, 2020 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the LLVMJIT to use the new runtime dispatch API

2 participants