8000 [xla:emitters] tag XLA, XLA:CPU and XLA:GPU dialects as non-prod-comp… · linux-on-ibm-z/tensorflow@fb32129 · GitHub
[go: up one dir, main page]

Skip to content

Commit fb32129

Browse files
cotatensorflower-gardener
authored andcommitted
[xla:emitters] tag XLA, XLA:CPU and XLA:GPU dialects as non-prod-compatible
This paves the way for XLA:CPU fusion emitters. Note that XLA:CPU is non-prod-compatible, whereas XLA:GPU is not. The CPU fusion emitters will depend on the XLA, XLA:CPU and XLA:GPU dialects, and given that the emitters' dependents in XLA:CPU are non-prod-compatible, the three dialects have to be as well. XLA:CPU passes also have to be tagged. Crucially, thanks to the parent CLs, XLA:GPU passes are not used anymore by any of the above dialects nor by XLA:CPU passes, so XLA:GPU remains essentially untouched; we just tag the XLA:GPU dialect. Some common libraries in xla/codegen/emitters are also tagged. PiperOrigin-RevId: 730442237
1 parent a7aaad7 commit fb32129

File tree

6 files changed

+26
-0
lines changed

6 files changed

+26
-0
lines changed

third_party/xla/xla/backends/cpu/codegen/emitters/ir/BUILD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
2+
load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable")
3+
load("//xla/tsl/platform:rules_cc.bzl", "cc_library")
24

35
package(
46
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
@@ -16,6 +18,7 @@ package_group(
1618
td_library(
1719
name = "xla_cpu_td_files",
1820
srcs = glob(["*.td"]),
21+
compatible_with = get_compatible_with_portable(),
1922
includes = ["."],
2023
deps = [
2124
"@llvm-project//mlir:BuiltinDialectTdFiles",
@@ -25,6 +28,7 @@ td_library(
2528

2629
gentbl_cc_library(
2730
name = "xla_cpu_dialect_inc_gen",
31+
compatible_with = get_compatible_with_portable(),
2832
strip_include_prefix = ".",
2933
tbl_outs 10000 = [
3034
(
@@ -43,6 +47,7 @@ gentbl_cc_library(
4347

4448
gentbl_cc_library(
4549
name = "xla_cpu_types_inc_gen",
50+
compatible_with = get_compatible_with_portable(),
4651
strip_include_prefix = ".",
4752
tbl_outs = [
4853
(
@@ -67,6 +72,7 @@ gentbl_cc_library(
6772

6873
gentbl_cc_library(
6974
name = "xla_cpu_ops_inc_gen",
75+
compatible_with = get_compatible_with_portable(),
7076
strip_include_prefix = ".",
7177
tbl_outs = [
7278
(

third_party/xla/xla/backends/cpu/codegen/emitters/transforms/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library")
2+
load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable")
3+
load("//xla/tsl/platform:rules_cc.bzl", "cc_library")
24

35
package(
46
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
@@ -15,6 +17,7 @@ package_group(
1517

1618
gentbl_cc_library(
1719
name = "passes_inc_gen",
20+
compatible_with = get_compatible_with_portable(),
1821
tbl_outs = [
1922
(
2023
[

third_party/xla/xla/backends/gpu/codegen/emitters/ir/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
2+
load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable")
3+
load("//xla/tsl/platform:rules_cc.bzl", "cc_library")
24

35
package(
46
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
@@ -16,6 +18,7 @@ package_group(
1618
td_library(
1719
name = "xla_gpu_td_files",
1820
srcs = glob(["*.td"]),
21+
compatible_with = get_compatible_with_portable(),
1922
includes = ["."],
2023
deps = [
2124
"//xla/codegen/emitters/ir:xla_td_files",
@@ -30,6 +33,7 @@ td_library(
3033

3134
gentbl_cc_library(
3235
name = "xla_gpu_dialect_inc_gen",
36+
compatible_with = get_compatible_with_portable(),
3337
strip_include_prefix = ".",
3438
tbl_outs = [
3539
(
@@ -48,6 +52,7 @@ gentbl_cc_library(
4852

4953
gentbl_cc_library(
5054
name = "xla_gpu_ops_inc_gen",
55+
compatible_with = get_compatible_with_portable(),
5156
strip_include_prefix = ".",
5257
tbl_outs = [
5358
(
@@ -66,6 +71,7 @@ gentbl_cc_library(
6671

6772
gentbl_cc_library(
6873
name = "xla_gpu_attrs_inc_gen",
74+
compatible_with = get_compatible_with_portable(),
6975
strip_include_prefix = ".",
7076
tbl_outs = [
7177
(
@@ -98,6 +104,7 @@ gentbl_cc_library(
98104

99105
gentbl_cc_library(
100106
name = "xla_gpu_types_inc_gen",
107+
compatible_with = get_compatible_with_portable(),
101108
strip_include_prefix = ".",
102109
tbl_outs = [
103110
(

third_party/xla/xla/codegen/emitters/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("//xla:xla.bzl", "xla_cc_test")
2+
load("//xla/tsl/platform:rules_cc.bzl", "cc_library")
23

34
package(
45
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],

third_party/xla/xla/codegen/emitters/ir/BUILD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
22
load("//xla/tests:build_defs.bzl", "xla_test")
3+
load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable")
4+
load("//xla/tsl/platform:rules_cc.bzl", "cc_library")
35

46
package(
57
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
@@ -17,6 +19,7 @@ package_group(
1719
td_library(
1820
name = "xla_td_files",
1921
srcs = glob(["*.td"]),
22+
compatible_with = get_compatible_with_portable(),
2023
includes = ["."],
2124
deps = [
2225
"@llvm-project//mlir:BuiltinDialectTdFiles",
@@ -30,6 +33,7 @@ td_library(
3033

3134
gentbl_cc_library(
3235
name = "xla_dialect_inc_gen",
36+
compatible_with = get_compatible_with_portable(),
3337
strip_include_prefix = ".",
3438
tbl_outs = [
3539
(
@@ -48,6 +52,7 @@ gentbl_cc_library(
4852

4953
gentbl_cc_library(
5054
name = "xla_ops_inc_gen",
55+
compatible_with = get_compatible_with_portable(),
5156
strip_include_prefix = ".",
5257
tbl_outs = [
5358
(
@@ -66,6 +71,7 @@ gentbl_cc_library(
6671

6772
gentbl_cc_library(
6873
name = "xla_attrs_inc_gen",
74+
compatible_with = get_compatible_with_portable(),
6975
strip_include_prefix = ".",
7076
tbl_outs = [
7177
(

third_party/xla/xla/codegen/emitters/transforms/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library")
2+
load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable")
3+
load("//xla/tsl/platform:rules_cc.bzl", "cc_library")
24

35
package(
46
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
@@ -29,6 +31,7 @@ cc_library(
2931

3032
gentbl_cc_library(
3133
name = "passes_inc_gen",
34+
compatible_with = get_compatible_with_portable(),
3235
tbl_outs = [
3336
(
3437
[

0 commit comments

Comments
 (0)
0