mlir-hlo
by
tensorflow

Description: The tensorflow/mlir-hlo repository is a deprecated standalone compiler implementation for HLO (High Level Optimizer) operations using MLIR infrastructure.

View on GitHub ↗

Summary Information

Updated 47 minutes ago
Added to GitGenius on April 25th, 2023
Created on July 18th, 2020
Open Issues & Pull Requests: 23 (+0)
Number of forks: 74
Total Stargazers: 421 (+0)
Total Subscribers: 19 (+0)

Issue Activity (beta)

Open issues: 20
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,484 days
Stale 30+ days: 20
Stale 90+ days: 20

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (2)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 326.3 days
Mean response time: 298.7 days
90th percentile: 569.3 days
Tracked items: 3

Most active contributors

Detailed Description

The tensorflow/mlir-hlo repository is a deprecated standalone compiler implementation for HLO (High Level Optimizer) operations using MLIR infrastructure. The project is no longer actively maintained, with the canonical codebase now located in the openxla/xla repository, and users are encouraged to migrate to StableHLO. The repository implements a self-contained compiler for linear algebra operations inspired by XLA's HLO IR, designed to provide an end-to-end compilation flow that operates independently of TensorFlow and XLA while remaining usable within those projects.

The repository defines three MLIR dialects to support HLO-style compilation pipelines. The chlo dialect serves as a client-level HLO representation closer to frontend usage, supporting implicit broadcast semantics and mapping to XLA client APIs used by TensorFlow, JAX, and PyTorch. The mhlo dialect represents meta-HLO, functioning as an intermediate optimization dialect that deviates from strict client or server constraints by supporting control flow with implicit capture, multiple result operations, and enhanced dynamic shape support. The lmhlo dialect represents late-stage meta-HLO after buffer allocation, materializing buffer allocation information directly in the intermediate representation rather than maintaining it as side-data structures as XLA does.

Building the repository requires cloning the LLVM/MLIR project and ensuring the correct commit is checked out via a build_tools script. The build process uses CMake with Ninja, requiring configuration of MLIR directories and enabling specific compiler flags. Testing is performed through the check-mlir-hlo target, with the build system designed to accommodate updates to LLVM revisions.

The project aims to provide an end-to-end compiler for CPU and GPU targets while building reusable components for other accelerators, drawing inspiration from XLA's success as a domain-specific compiler framework for linear algebra. HLO operations work with immutable tensors featuring static or bounded shapes and explicit broadcasts, with a carefully curated and orthogonal operation set. The repository follows MLIR Developer Guide conventions, positioning itself as an incubator for technology to be upstreamed into MLIR itself.

According to GitGenius activity tracking, the repository shows relatively low engagement with a median issue and pull request response latency of 7830.5 hours and mean latency of 7167.9 hours, reflecting its deprecated status. The most active tracked contributors include heshuju and sdasgup3, each with single recorded events. The repository maintains overlapping contributors with major projects including llvm/llvm-project, jax-ml/jax, and pytorch/pytorch, indicating its role within the broader machine learning compiler ecosystem.

The mhlo dialect represents the primary innovation space, allowing experimentation with features intended for upstream MLIR TCP without constraints from XLA implementation requirements. It supports operations on arbitrary types and enables user extension through MLIR interfaces. The dialect differs from XLA HLO in supporting while operations with multiple operands and results, avoiding deprecated constructs like stateful RNG operations, and providing enhanced dynamic shape support. The repository contains no TensorFlow, protobuf, or Google-internal dependencies at the dialect level, facilitating broader adoption and integration into other compiler frameworks.

mlir-hlo
by
tensorflowtensorflow/mlir-hlo

Repository Details

Fetching additional details & charts...