Skip to content

Commit

Permalink
Bump ml_dtypes version to include MX floating point types
Browse files Browse the repository at this point in the history
Bumping the jax-ml/ml_dtypes version:

Unblocks the implementation of MX floating point types in XLA (openxla/xla#18085)
Allows enabling E3M4/E4M3 dtypes in XLA python client (https://github.com/openxla/xla/blob/main/xla/python/xla_client.py#L279)

This closes openxla/xla#18198

PiperOrigin-RevId: 693502196
  • Loading branch information
sergey-kozub authored and copybara-github committed Nov 5, 2024
1 parent 5f362f8 commit 1574b79
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions third_party/py/ml_dtypes/ml_dtypes.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ cc_library(
],
)

cc_library(
name = "mxfloat",
hdrs = ["include/mxfloat.h"],
include_prefix = "ml_dtypes",
# Internal headers are all relative to . but other packages
# include these headers with the prefix.
includes = [
".",
"ml_dtypes",
],
)

pybind_extension(
name = "_ml_dtypes_ext",
srcs = [
Expand All @@ -48,6 +60,7 @@ pybind_extension(
deps = [
":float8",
":intn",
":mxfloat",
"@eigen_archive//:eigen3",
"@tsl//third_party/py/numpy:headers",
],
Expand Down
4 changes: 2 additions & 2 deletions third_party/py/ml_dtypes/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ float8 varieties, and int4.
load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")

def repo():
ML_DTYPES_COMMIT = "6f02f77c4fa624d8b467c36d1d959a9b49b07900"
ML_DTYPES_SHA256 = "c5b421a3b8549c020582b9be5e9edf8bb6e9d4284cbd44b0babe6640b4af18da"
ML_DTYPES_COMMIT = "c12281a501469d553483eb4d68065826b9c2fcb5"
ML_DTYPES_SHA256 = "cee11c4bed5147bece9e385a88c20887344ad9b89b3acb09bf3d7c9c21fb9715"
tf_http_archive(
name = "ml_dtypes",
build_file = "//third_party/py/ml_dtypes:ml_dtypes.BUILD",
Expand Down

0 comments on commit 1574b79

Please sign in to comment.