Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HAL rewrite branch rebased onto google branch.
Removing unused HAL files/functions/types. Removing last use of HAL C++ from the HAL VM module. Swapping many C++ HAL types/enums for C ones. Removing iree/base/bitfield.h. The formatting functionality will reappear in iree_string_builder. Removing iree/hal/cts/ for now until it can be ported to C. Issue iree-org#3934 is tracking this. Moving HAL C++ types to iree/hal/cc/. Removing C++ command buffer validation as it'll be moved into C. Porting the HAL C++ API to C. Unfortunately the string handling code is still very dependent on abseil, but everything else is now just plain C. Fixing quoting on cmake variables that *must* be quoted. (iree-org#4404) Removing unused iree/hal/testing/ mock types. Adding a new arena type with a shared thread-safe block pool. This will be used to provide storage for command buffers and other builder types (submissions/etc) in the local HAL backend. Fixing tracing macro errors with the latest VC++. Got a new error emitted: `error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax` Unfortunately C99 supports paren-init and not non-paren-init and C++ supports the opposite so this error is dumb. Oh well. Porting a majority of Vulkan/Metal to C. Removing Metal backend until it can be replaced. This commit can be used to revive the configuration for the driver and view a partially-ported version of it. The actual implementation will need to be rebased onto the C type system and written in Objective C. Note that the compiler backend has not been removed - we can use that for verifying metal shader output. Issue iree-org#4370 tracks reviving this. Removing iree/base/time.h now that no C++ remains using it. Windows ptr atomics fix (needs test coverage, obviously). Ensure wait handles are zero-initialized. Removing unused status results. Adding support for cleaning up tasks when retired/discarded. Making call and dispatch task closures independent types. Adding batch task submission enqueuing. Fixing executables with multiple pipelines in Vulkan. Disabling executable linking until it can be fixed iree-org#4536. Revive the HAL CTS using the C API. (iree-org#4498) Adding back a Conformance Test Suite of tests for HAL drivers. These tests were forked from the prior [iree/hal/cts/ tests](https://github.com/google/iree/tree/6f1afa5ebf82d31dafc0c3e835c8baf3eea2ceda/iree/hal/cts), rebased on the new HAL C APIs, then expanded upon. Tests pass with no validation layer warnings on the new Vulkan HAL on Windows with an NVIDIA GPU using latest drivers. Fixes iree-org#3934, part of iree-org#4369. Allowing iree_task_barrier_t to be initialized in two steps. This is required when incrementally building the barrier: you want to insert the barrier into the task DAG prior to knowing what the dependent tasks are. Improving `iree_task_post_batch_select_worker`. With the way command buffers are issued today it tended to bias toward only dispatching on the current worker and - even if worked around - would bias towards idle workers even after the batch is queuing work on them. This more evenly distributes work when many tasks are dispatched within the same batch. Working around crap _mktemp behavior. It only generates 26 unique names per thread o_o Adding a new iree/hal/local/ path as the local CPU driver. This subsumes the existing iree/hal/host/ and will allow us to share the same device for all local execution - including mixing and matching executables in different forms (AOT, vmla, JIT, etc) within the same device. It also adds the (initial, unoptimized) task-system based command buffer and semaphore implementations. Porting both the dylib and vmla drivers to use iree/hal/local. Both entire drivers are now just loader implementations and then shims that match the existing registration. In the future there will just be --driver=local and dylib/vmla will just be compiler registrations like HAL driver registrations currently are. Removing iree/hal/host/ now that it is unused. Moving VMLA VM module to iree/modules/vmla/. Fixing temp file path cleanup. Can't wait to remove this code. Making IREE_EXPECT_OK/IREE_ASSERT_OK print better messages. Removing unused line to remove warning. Tweaking iree_atomic_* macros to better check types and adding a test. Fixing a type typo in the python bindings. Fixing third_party/half bazel-to-cmake mapping. Fixing a race where threads start prior to their handle being assigned. Treating push constants offset/length as bytes in the API. IR still needs a fixup, but is fine for now. Making iree_status_t a non-void type to get better warnings on misuse. Force mapping on hal.allocator.wrap.byte_buffer (today). Cleanup of compile-time detection of sanitizers to enable TSAN/MSAN. Also adds --config=tsan and --config=msan to iree.bazelrc. Making threads join on shutdown (for sanity). Doesn't seem to change anything but there's not really a reason to detach and I'd rather never have to think about this code again. Fixing push constants not being included in executable layout caching. This would cause all kind of badness when multiple executables shared the same hal.interface bindings but had differing push constants. Adding iree_task_pool_t tests. Adding iree_task_queue_t tests. Adding iree_task_scope_t tests. Adding iree_task_list_discard test. Adding iree_task_topology_t tests and simplifying allocation. The max size on the stack is 3KB, which is fine for something transient like this that is only used for construction of the executor. Removing HAL backend implementations of fill/read/write/copy. They were all implemented using mapping anyway and this way we only have that code once and make the restriction that buffers be mappable part of their usage uniformly. Better error status when drivers are not registered. Split iree/tools/test/simple.mlir as it was a PITA all as one. Fix Vulkan GUI sample after HAL C changes. (iree-org#4603) More fixes after HAL C changes. (iree-org#4604) * Use `IREE_RESTRICT` for older MSVC versions. * Update iree-run-module-vulkan-gui-main.cc * Include <atomic> for std::atomic use in GetTempFile. Tested CMake build of `all` (vmla+vulkan only) on my Windows machine, with samples and Vulkan enabled. Properly handling nop tasks in the task system. Adding tests for the various iree_task_t types. Temporarily disabling failing task system wait test. This case is not yet exercised from our code but I'll be fixing it ASAP anyway. Fixing off-by-one in minilcg128.
- Loading branch information