-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lower VM dialect to LLVM IR #34
Comments
Good question! Having an In the end there should be little difference in the final binaries produced via EmitC and LLVM IR - the major benefit of LLVM IR would be that as a user you'd get a .o you just link against vs needing to setup your own C compiler to produce the .o (and have all of IREE's source). Just like we do on the HAL executable side you could also produce .so's that are directly loadable by some But there are still interesting scenarios for it and I think the big unanswered thing for LLVM IR that would be good to explore first is how we avoid needing to manually reproduce all of what we have defined in C without requiring clang to do the parsing. Though we lower through LLVM IR it'd be nice to support non-clang compilers/non-LLVM linkers and that means we may not have clang available and need to emit object files (coff/elf/etc). The EmitC target is nice as it is able to reference all the iree/vm/ types and functions textually while an LLVM IR target would need proper LLVM types for everything. It's not a trivial surface area and where we do have to replicate things today (iree/compiler/Dialect/HAL/Target/LLVM/LibraryBuilder.cpp) it's pretty nasty even though scoped to just a few definitions. The HAL executable side there is also a bit different as it's meant to have a fairly stable API between the runtime and the executable, while the VM output is using less stable types that may change more frequently. That said after https://github.com/google/iree/projects/32 there really shouldn't be many more changes to the VM APIs so it may be fine if we have to replicate things. There are some other options, though, like something that parsed the headers and dumped them to a bitcode file we could load in the compiler like we do for librt. If it only contains all the type definitions and function declarations it should be relatively small. The compiler code would then load that module, merge it with the one it is generating, and be able to call the inline functions. It still would have a relatively tight coupling to the implementation details of the C, though, so I'm not sure exactly how beneficial it would be besides avoiding all the type/inline function/etc boilerplate implemented in C++ by hand. So all that said, so far due to the increased complexity/maintenance burden of LLVM IR and smaller scenario-specific benefits to tiny systems we've shied away from it. There's a few big things that would help even if LLVM IR was used instead of EmitC and would be possible to immediately make progress on and see the benefits of. Some are more infrastructure related (a C-compatible benchmark library we could plug in under |
Thanks for the detailed overview. Focusing on the shared bits between the 2 approaches indeed makes sense. After taking a tour in the issues you linked, I would like to start working on the HAL devirtualization issue (#6641) (and hopefully discovering some other opportunities for code shrinking). Since this is a new corner for me, I will take a few days to explore the HAL API and then dive into the issue. (Feel free to assign me to #6641 if you like :)). |
Closing for now as we don't have a priority need for this and it's not something that'd be merged yet if it was done (still too much churn). |
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
…ordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Co-authored-by: Boian Petkantchin <boian@nod-labs.com>
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
Use flags -DIREE_BUILD_EXPERIMENTAL_LEVEL_ZERO=ON -DLEVEL_ZERO_HEADERS_API_ROOT=/home/stanley/nod/level-zero -LevelZero HAL Driver -Addi OpenCL HAL Target compiler -Add SPIRV Codegen for Kernel capability -fix illegal pointer arithmetic on void* by Boian -Use events for command buffer execution and synchronization (iree-org#47) -Add flag for switching between Physical64 and Physical32 addressing in OpenCL -enable creation of device by UUID + ID(device handle as uintptr_t) Note that the device ID implemented like that is ephemeral and is valid only in the current IREE runtime context. If you start a new process the IDs will be different. With this change you can do $ iree-run-module --list_devices level_zero://00005100-0000-0000-0000-000000000001 $ iree-run-module --device=level_zero://00005100-0000-0000-0000-000000000001 ... -add query_memory_heaps implementation Fixes error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith] -Supply structure type when passing such arguments in accordance with the API (iree-org#34) When calling Level Zero API functions that query information and use a struct to populate the information, the user must supply the structure type (stype) in the structure itself. The struct is both in and out argument. Fix Level Zero build Remove usage of iree_hal_command_buffer_dyn_cast.
For scenarios where dynamic module loading is not required and entire modules can be compiled into applications we can lower the VM IR to LLVM IR within MLIR's transformation pipeline. Instead of embedding vm.call ops that are dispatched at runtime to things like the HAL we can instead lower to llvm::CallInst to runtime-resolved function pointers. This still enables all of the flexibility of heterogeneous/runtime-determined devices, pluggable diagnostics, and backend composition without any need for flatbuffers or the VM bytecode interpreter.
The VM was designed to make such a lowering easy and the C-style struct-based function pointer registration for runtime modules was designed to make emitting code that used it fairly robust even when linked in dynamically such as when embedded in shared objects.
An extension of this is what we've been calling 'runtimeless mode', where the IREE VM linkage code is statically linked into the binary alongside the generated module LLVM IR. If only a single HAL backend is linked in then (with some build-fu) we should be able to get call devirtualization to reduce code size to precisely the functionality used by the module.
Early versions can be tested by tacking on additional vm-to-llvm conversions on the primary pipeline, and for integration a new
iree/compiler/Translation
target can be added (or an option can be added here: https://github.com/google/iree/blob/master/iree/compiler/Translation/IREEVM.cpp#L93)The text was updated successfully, but these errors were encountered: