commit | f36ec2915aae072f70273c48a0703af189a5facd | [log] [tgz] |
---|---|---|
author | bjacob <benoitjacob@google.com> | Thu Jul 07 11:39:54 2022 -0400 |
committer | GitHub <noreply@github.com> | Thu Jul 07 08:39:54 2022 -0700 |
tree | d7348d18d8c43088a0d54a02d98932ae111f14aa | |
parent | 202436e60e2874a8d9a5adaac296d330f0071b1f [diff] |
Consistently treat worker_*_masks as loose hints with relaxed accesses (#9722) This makes worker_*_mask accesses use memory_order_relaxed, making them be only fast and loose hints, and not play a role in ordering other accesses. Some of these used to be relaxed until https://github.com/iree-org/iree/pull/8854 which made worker_live_mask use acquire/release to fix a specific race reported by TSan. This PR re-solves that in a different way: the missing ordering is now provided instead by an atomic access to worker->state. Some accesses (in worker.c) were seq_cst even before https://github.com/iree-org/iree/pull/8854, so this new PR makes more things relaxed than were even back then. This is part of a more general, consistent move towards this design: * worker->state is the only memory-ordering, coherent view of workers' state. * worker_*_mask is only fast and loose hints. In https://github.com/iree-org/iree/pull/9560 I was questioning the need for those hints, but they really serve a purpose: for callers that favor performance over getting the most up-to-date information and that need to iterate over all workers, worker_*_mask allows to get that information in just 1 atomic load instead of N, and that atomic load is now relaxed.
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.