Skip to content

Commit

Permalink
Bumping HAL module version to 0.3.
Browse files Browse the repository at this point in the history
This is a breaking change between compiler and runtime and versions
will not be compatible. Compiled artifacts using the HAL must be
recompiled.
  • Loading branch information
benvanik committed Jul 30, 2024
1 parent 3ea1357 commit ad9634e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
15 changes: 5 additions & 10 deletions compiler/src/iree/compiler/Dialect/HAL/hal.imports.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ vm.import private @allocator.allocate(
%buffer_usage : i32,
%allocation_size : i64
) -> !vm.ref<!hal.buffer>
attributes {minimum_version = 1 : i32}

// Imports a host byte buffer into a device visible buffer.
// If try!=0 then returns null if the given memory type cannot be mapped.
Expand All @@ -48,7 +47,6 @@ vm.import private @allocator.import(
%offset : i64,
%length : i64
) -> !vm.ref<!hal.buffer>
attributes {minimum_version = 1 : i32}

//===----------------------------------------------------------------------===//
// iree_hal_buffer_t
Expand Down Expand Up @@ -202,6 +200,9 @@ vm.import private @command_buffer.create(
%queue_affinity : i64,
%binding_capacity : i32
) -> !vm.ref<!hal.command_buffer>
attributes {
minimum_version = 3 : i32 // command buffer API version
}

// Finalizes recording into the command buffer and prepares it for submission.
// No more commands can be recorded afterward.
Expand Down Expand Up @@ -448,16 +449,10 @@ vm.import private @device.queue.flush(
//===----------------------------------------------------------------------===//

vm.import private @devices.count() -> i32
attributes {
minimum_version = 2 : i32,
nosideeffects
}
attributes {nosideeffects}

vm.import private @devices.get(%index : i32) -> !vm.ref<!hal.device>
attributes {
minimum_version = 2 : i32,
nosideeffects
}
attributes {nosideeffects}

//===----------------------------------------------------------------------===//
// iree_hal_executable_t
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/iree/modules/hal/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
// Module type definitions
//===----------------------------------------------------------------------===//

#define IREE_HAL_MODULE_VERSION_0_2 0x00000002u
#define IREE_HAL_MODULE_VERSION_LATEST IREE_HAL_MODULE_VERSION_0_2
#define IREE_HAL_MODULE_VERSION_0_3 0x00000003u
#define IREE_HAL_MODULE_VERSION_LATEST IREE_HAL_MODULE_VERSION_0_3

typedef struct iree_hal_module_t {
iree_allocator_t host_allocator;
Expand Down

0 comments on commit ad9634e

Please sign in to comment.