Skip to content

[7.7.0] Add support for riscv64 linux#25699

Closed
kxxt wants to merge 2 commits intobazelbuild:release-7.7.0from
kxxt:rv-7.x
Closed

[7.7.0] Add support for riscv64 linux#25699
kxxt wants to merge 2 commits intobazelbuild:release-7.7.0from
kxxt:rv-7.x

Conversation

@kxxt
Copy link
Copy Markdown
Contributor

@kxxt kxxt commented Mar 26, 2025

This patch brings enough support for bootstraping bazel itself on riscv64 linux platform.

Changes:

Tested on riscv 64 linux by bazel build //src:bazel --compilation_mode=opt

@kxxt kxxt requested a review from a team as a code owner March 26, 2025 04:31
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Mar 26, 2025
@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Mar 26, 2025

Looks like the bump of stardoc brings some incompatible changes.

@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Mar 26, 2025

Looks like the bump of stardoc brings some incompatible changes.

Fixed by bumping stardoc again to 0.7.1 (and bumping rules_jvm_external to 6.1 as a result)

@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Mar 26, 2025

The CI is complaining about lockfile not up to date. It is confusing as when I tried to update the lockfile locally, no change happened.

@kxxt kxxt moved this to In progress in FOSS TODO List Mar 26, 2025
@iancha1992 iancha1992 added potential 7.x cherry-picks Potential cherry-picks for the next 7.x release. We'll consider a new 7.x release if enough issues team-Rules-Java Issues for Java rules labels Mar 26, 2025
@iancha1992
Copy link
Copy Markdown
Member

iancha1992 commented Mar 26, 2025

Hi @kxxt
Unfortunately, we are not planning another Bazel 7 release yet. However, if we do have another release, then we'll come back to this one and include the fix. Thank you!

@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Mar 26, 2025

Hi @kxxt Unfortunately, we are not planning another Bazel 7 release yet. However, if we do have another release, then we'll come back to this one and include the fix. Thank you!

Then I will keep this patch at downstream distro packaging for a while. Thanks!

kxxt added a commit to kxxt/archriscv-packages that referenced this pull request Mar 27, 2025
Add riscv64 support to bazel7:

Upstreamed as bazelbuild/bazel#25699

Upstream is currently not planning another bazel 7 release so we need
to keep this patch at downstream for a while.
felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this pull request Mar 27, 2025
Add riscv64 support to bazel7:

Upstreamed as bazelbuild/bazel#25699

Upstream is currently not planning another bazel 7 release so we need
to keep this patch at downstream for a while.
@kxxt kxxt changed the base branch from release-7.6.0 to release-7.6.1 March 31, 2025 03:55
@kxxt kxxt changed the title [7.6.0] Add support for riscv64 linux [7.6.1] Add support for riscv64 linux Mar 31, 2025
@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Mar 31, 2025

I have changed the base branch to 7.6.1 and bumped rules_jvm_external again, which should fix the lockfile issue.

@kxxt kxxt force-pushed the rv-7.x branch 2 times, most recently from ff602e9 to 02be469 Compare March 31, 2025 04:27
@iancha1992 iancha1992 closed this Apr 16, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in FOSS TODO List Apr 16, 2025
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Apr 16, 2025
@iancha1992
Copy link
Copy Markdown
Member

@bazel-io fork 7.7.0

@kxxt kxxt changed the base branch from release-7.6.1 to release-7.7.0 September 17, 2025 04:14
@kxxt kxxt changed the title [7.6.1] Add support for riscv64 linux [7.7.0] Add support for riscv64 linux Sep 17, 2025
@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Sep 17, 2025

The CI is failing with "ERROR: Error computing the main repository mapping: Error accessing registry https://bcr.bazel.build/: Failed to fetch registry file https://bcr.bazel.build/modules/rules_java/7.12.5/MODULE.bazel: Unknown host: bcr.bazel.build" error.

I am not sure what to do to fix it as it looks like a DNS/hosts configuration problem.

@iancha1992
Copy link
Copy Markdown
Member

@kxxt Can you please get this one merged to the master first? We'll cherry-pick the commit to the release branches after.

@kxxt
Copy link
Copy Markdown
Contributor Author

kxxt commented Sep 17, 2025

@kxxt Can you please get this one merged to the master first? We'll cherry-pick the commit to the release branches after.

It is already in master: #25236 . But a cherry-pick is not sufficient, as more dependency bumps are required to make riscv64 support work on v7.

IgnotaYun pushed a commit to IgnotaYun/bazel that referenced this pull request Oct 15, 2025
IgnotaYun pushed a commit to IgnotaYun/bazel that referenced this pull request Oct 15, 2025
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 3, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 3, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 3, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 3, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 3, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 4, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 4, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 4, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 4, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 825073762
@meteorcloudy
Copy link
Copy Markdown
Member

Unfortunately this didn't make it for 7.7.0 release, I'll have to close this one. We could backport to 8.5.0 if you want.

@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Nov 17, 2025
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 26, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 26, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Nov 26, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Dec 2, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Dec 2, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Dec 2, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
copybara-service bot pushed a commit to openxla/xla that referenced this pull request Dec 2, 2025
Imported from GitHub PR tensorflow/tensorflow#102607

This commit fixes #102159 which prevented TensorFlow from compiling on RISC-V 64 due to missing codepath in the build system.

RFC: Currently this patch overrides timeout of rules_python for all platforms which is obviously not ideal. How do we set pip package timeout here in Tensorflow?

See also:
- bazelbuild/bazel#25236
- bazelbuild/bazel#25699
- bazel-contrib/rules_python#3350
- #32812
- tensorflow/runtime#135
Copybara import of the project:

--
13b7db883e6ea0aa631490fb5f806c55ceea7cb5 by gns <root@infi.wang>:

[XLA:CPU] Add support for riscv64

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
a00c3a3ba94664798960cbc2fb0a6746fe0c3ac1 by gns <root@infi.wang>:

Add missing llvm:: namespace qualifiers for DTensor

Add the `llvm::` namespace prefix to `cast` and `isa`
where it was missing in the DTensor MLIR code.

--
febc5abc56ab302f5f39fe20176ed00c0c95cb7e by gns <root@infi.wang>:

runtime: add missing stdint header

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
6bf63fec56a6d961b06d932fe69b76eae89d8cb7 by gns <root@infi.wang>:

Add riscv64 support patch for rules_python

bazel-contrib/rules_python#3350

--
68c44fa9613d5577f36c51a192c932795e13ed83 by gns <root@infi.wang>:

tools: py: add riscv64 to pip and manylinux compilance test

--
3f2fe1e0256476449f64658219d997727c9cc534 by gns <root@infi.wang>:

Lift timeout of rules_python for BFS wheels

--
252a9b7ad2336b7abbb94e269b4a976b45d5d6e7 by gns <root@infi.wang>:

Revert llvm toolchain patch for riscv64

As already upstreamed.

Co-authored-by: Levi Zim <rsworktech@outlook.com>

--
51047a86131e991ffea74fccb8f55e3521237a64 by gns <root@infi.wang>:

Lift timeout for BFS wheels during pip init

--
3b8276420031969423c9a1f150341a0e41fa372e by gns <root@infi.wang>:

Refresh `rules_python` riscv64 patch

Co-authored-by: Levi Zim <rsworktech@outlook.com>

Merging this change closes #102607

FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#102607 from infiWang:riscv64 3b8276420031969423c9a1f150341a0e41fa372e
PiperOrigin-RevId: 836231774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants