xref: /aosp_15_r20/external/tensorflow/third_party/eigen3/workspace.bzl (revision b6fb3261f9314811a0f4371741dbb8839866f948)
1"""Provides the repository macro to import Eigen."""
2
3load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
4
5def repo():
6    """Imports Eigen."""
7
8    # Attention: tools parse and update these lines.
9    # LINT.IfChange
10    EIGEN_COMMIT = "34780d8bd13d0af0cf17a22789ef286e8512594d"
11    EIGEN_SHA256 = "e5da7faf0f603dac718fca8d6f564cd8ed57cfe79aa40d165b2393fe31b5f6f4"
12    # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/eigen.cmake)
13
14    tf_http_archive(
15        name = "eigen_archive",
16        build_file = "//third_party/eigen3:eigen_archive.BUILD",
17        sha256 = EIGEN_SHA256,
18        strip_prefix = "eigen-{commit}".format(commit = EIGEN_COMMIT),
19        urls = tf_mirror_urls("https://gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT)),
20    )
21