load("//xla/tests:build_defs.bzl", "xla_test")

package(
    # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
    default_visibility = ["//visibility:public"],
    licenses = ["notice"],
)

_GPU_TARGETS = [
    "h100",
    "b200",
    "gb200",
    "gb300",
]

filegroup(
    name = "test_dummy_test_data",
    testonly = True,
    srcs = glob(["executables/test_dummy_test/**"]),
    visibility = ["//xla/tests/aot_compatibility:__pkg__"],
)

xla_test(
    name = "collective_ops_aot_test",
    srcs = ["collective_ops_aot_test.cc"],
    backends = _GPU_TARGETS,
    data = glob(["executables/collective_ops_aot_test_2gpu_*/**/*.pbtxt"]),
    disabled_backends = [
        # TODO(b/491194726): Serialized executable compute capability 6.0 does not match sm_10.3a.
        "gb300",
    ],
    tags = [
        "multi_gpu",
        "no_oss",
    ],
    deps = [
        "//xla:literal",
        "//xla/service:hlo_module_config",
        "//xla/tests:aot_interception_pjrt_client",
        "//xla/tests:literal_test_util",
        "//xla/tests:xla_internal_test_main",
        "//xla/tests/aot_compatibility:test_lib",
        "//xla/tsl/platform:logging",
        "//xla/tsl/platform:test",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/types:span",
        "@tsl//tsl/platform:path",
    ],
)
