Skip to content

Commit

Permalink
Update ml_dtypes version to 0fa5313b65efe848c5968a15dd37dd220cc29567.
Browse files Browse the repository at this point in the history
Also add mxfloat as a dependency to TensorFlow and TSL. This is needed to merge #19096. Previously this was done in the merge commit for that PR, but the PR was rolled back since the new types caused an internal TF Android build to fail. Now it's being done in this separate, smaller change so its easier to rollback if issues occur.

PiperOrigin-RevId: 714285735
  • Loading branch information
reedwm authored and Google-ML-Automation committed Jan 11, 2025
1 parent 5272bcd commit e30ab06
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
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 = "215c9f02a121e6286662b2efd30546c71054d5e5"
ML_DTYPES_SHA256 = "4a03237ef6345e1467a33d126176b9c6a7539b0f60a34b344f39b3c9e8b82438"
ML_DTYPES_COMMIT = "0fa5313b65efe848c5968a15dd37dd220cc29567"
ML_DTYPES_SHA256 = "69c562bb961a21d92357c7709430553c226caac75a751c0aa52955ca14ce8641"
tf_http_archive(
name = "ml_dtypes",
build_file = "//third_party/py/ml_dtypes:ml_dtypes.BUILD",
Expand Down
4 changes: 2 additions & 2 deletions third_party/tsl/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 = "215c9f02a121e6286662b2efd30546c71054d5e5"
ML_DTYPES_SHA256 = "4a03237ef6345e1467a33d126176b9c6a7539b0f60a34b344f39b3c9e8b82438"
ML_DTYPES_COMMIT = "0fa5313b65efe848c5968a15dd37dd220cc29567"
ML_DTYPES_SHA256 = "69c562bb961a21d92357c7709430553c226caac75a751c0aa52955ca14ce8641"
tf_http_archive(
name = "ml_dtypes",
build_file = "//third_party/py/ml_dtypes:ml_dtypes.BUILD",
Expand Down
1 change: 1 addition & 0 deletions third_party/tsl/tsl/platform/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ cc_library(
deps = [
"@ml_dtypes//:float8",
"@ml_dtypes//:intn",
"@ml_dtypes//:mxfloat",
],
)

Expand Down
3 changes: 3 additions & 0 deletions third_party/tsl/tsl/platform/ml_dtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ limitations under the License.

#include "ml_dtypes/include/float8.h" // from @ml_dtypes
#include "ml_dtypes/include/intn.h" // from @ml_dtypes
#include "ml_dtypes/include/mxfloat.h" // from @ml_dtypes

namespace tsl {
using float4_e2m1fn = ::ml_dtypes::float4_e2m1fn;
using float8_e3m4 = ::ml_dtypes::float8_e3m4;
using float8_e4m3 = ::ml_dtypes::float8_e4m3;
using float8_e4m3fn = ::ml_dtypes::float8_e4m3fn;
using float8_e4m3fnuz = ::ml_dtypes::float8_e4m3fnuz;
using float8_e4m3b11fnuz = ::ml_dtypes::float8_e4m3b11fnuz;
using float8_e5m2 = ::ml_dtypes::float8_e5m2;
using float8_e5m2fnuz = ::ml_dtypes::float8_e5m2fnuz;
using float8_e8m0fnu = ::ml_dtypes::float8_e8m0fnu;

using int1 = ::ml_dtypes::int1;
using uint1 = ::ml_dtypes::uint1;
Expand Down

0 comments on commit e30ab06

Please sign in to comment.