2024-04-18 04:03:03 -07:00
|
|
|
# Copyright 2024 The JAX Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
load(
|
|
|
|
"//jaxlib:jax.bzl",
|
|
|
|
"jax_generate_backend_suites",
|
2024-09-24 12:28:32 -07:00
|
|
|
"jax_multiplatform_test",
|
2024-10-31 02:46:55 -07:00
|
|
|
"jax_py_test",
|
2024-04-18 04:03:03 -07:00
|
|
|
"py_deps",
|
|
|
|
)
|
|
|
|
|
|
|
|
licenses(["notice"])
|
|
|
|
|
|
|
|
package(
|
|
|
|
default_applicable_licenses = [],
|
|
|
|
default_visibility = ["//visibility:private"],
|
|
|
|
)
|
|
|
|
|
|
|
|
jax_generate_backend_suites()
|
|
|
|
|
2024-09-24 12:28:32 -07:00
|
|
|
jax_multiplatform_test(
|
2024-04-18 04:03:03 -07:00
|
|
|
name = "gpu_test",
|
2024-04-25 12:25:26 -07:00
|
|
|
srcs = ["gpu_test.py"],
|
2024-09-27 06:14:50 -07:00
|
|
|
enable_backends = [],
|
2024-09-13 04:23:29 -07:00
|
|
|
enable_configs = [
|
|
|
|
"gpu_h100",
|
2025-01-14 11:55:02 -08:00
|
|
|
"gpu_h100x2",
|
2024-09-13 04:23:29 -07:00
|
|
|
],
|
2025-02-11 03:24:30 -08:00
|
|
|
env = {"XLA_FLAGS": "--xla_gpu_autotune_level=0"},
|
2025-02-28 05:40:39 -08:00
|
|
|
shard_count = 16,
|
2025-03-11 10:27:37 -07:00
|
|
|
tags = [
|
|
|
|
"multiaccelerator",
|
|
|
|
"noasan", # Times out.
|
|
|
|
],
|
2024-04-18 04:03:03 -07:00
|
|
|
deps = [
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
] + py_deps("absl/testing") + py_deps("numpy"),
|
|
|
|
)
|
2024-04-25 12:25:26 -07:00
|
|
|
|
2024-10-31 02:46:55 -07:00
|
|
|
jax_py_test(
|
|
|
|
name = "gpu_dialect_test",
|
|
|
|
srcs = ["gpu_dialect_test.py"],
|
|
|
|
deps = [
|
|
|
|
"//jax",
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
"//jax:test_util",
|
|
|
|
] + py_deps("absl/testing"),
|
|
|
|
)
|
|
|
|
|
2024-12-11 07:30:53 -08:00
|
|
|
jax_py_test(
|
|
|
|
name = "gpu_layout_inference_test",
|
|
|
|
srcs = ["gpu_layout_inference_test.py"],
|
|
|
|
deps = [
|
|
|
|
"//jax",
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
"//jax:test_util",
|
|
|
|
] + py_deps("absl/testing"),
|
|
|
|
)
|
|
|
|
|
2025-03-13 23:21:43 -07:00
|
|
|
jax_py_test(
|
|
|
|
name = "gpu_transform_inference_test",
|
|
|
|
srcs = ["gpu_transform_inference_test.py"],
|
|
|
|
deps = [
|
|
|
|
"//jax",
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
"//jax:test_util",
|
|
|
|
] + py_deps("absl/testing"),
|
|
|
|
)
|
|
|
|
|
2024-09-24 12:28:32 -07:00
|
|
|
jax_multiplatform_test(
|
2024-04-25 12:25:26 -07:00
|
|
|
name = "matmul_test",
|
|
|
|
srcs = ["matmul_test.py"],
|
2024-09-27 06:14:50 -07:00
|
|
|
enable_backends = [],
|
|
|
|
enable_configs = ["gpu_h100"],
|
2024-08-13 03:21:12 -07:00
|
|
|
shard_count = 5,
|
2024-04-25 12:25:26 -07:00
|
|
|
deps = [
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
"//jax/experimental/mosaic/gpu/examples:matmul",
|
2024-08-13 03:21:12 -07:00
|
|
|
] + py_deps("absl/testing") + py_deps("numpy") + py_deps("hypothesis"),
|
2024-04-25 12:25:26 -07:00
|
|
|
)
|
|
|
|
|
2024-09-24 12:28:32 -07:00
|
|
|
jax_multiplatform_test(
|
2024-04-29 09:30:42 -07:00
|
|
|
name = "flash_attention",
|
2024-08-26 09:10:26 -07:00
|
|
|
srcs = ["//jax/experimental/mosaic/gpu/examples:flash_attention.py"],
|
2024-09-27 06:14:50 -07:00
|
|
|
enable_backends = [],
|
|
|
|
enable_configs = ["gpu_h100"],
|
2024-08-26 09:10:26 -07:00
|
|
|
main = "//jax/experimental/mosaic/gpu/examples:flash_attention.py",
|
2024-05-20 01:35:05 -07:00
|
|
|
tags = ["notap"],
|
2024-04-29 09:30:42 -07:00
|
|
|
deps = [
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
] + py_deps("numpy"),
|
|
|
|
)
|
2024-06-12 08:41:42 -07:00
|
|
|
|
2024-09-24 12:28:32 -07:00
|
|
|
jax_multiplatform_test(
|
2024-06-12 08:41:42 -07:00
|
|
|
name = "flash_attention_test",
|
|
|
|
srcs = ["flash_attention_test.py"],
|
2024-09-27 06:14:50 -07:00
|
|
|
enable_backends = [],
|
|
|
|
enable_configs = ["gpu_h100"],
|
2024-06-12 08:41:42 -07:00
|
|
|
deps = [
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
"//jax/experimental/mosaic/gpu/examples:flash_attention",
|
|
|
|
] + py_deps("absl/testing"),
|
|
|
|
)
|
2024-11-19 22:48:35 -05:00
|
|
|
|
|
|
|
jax_multiplatform_test(
|
|
|
|
name = "profiler_cupti_test",
|
|
|
|
srcs = ["profiler_cupti_test.py"],
|
|
|
|
enable_backends = [],
|
|
|
|
enable_configs = ["gpu_h100"],
|
|
|
|
tags = [
|
|
|
|
"noasan", # CUPTI leaks memory
|
|
|
|
"nomsan",
|
|
|
|
],
|
2024-12-11 05:29:10 -08:00
|
|
|
deps = [
|
|
|
|
"//jax:mosaic_gpu",
|
|
|
|
] + py_deps("absl/testing"),
|
2024-11-19 22:48:35 -05:00
|
|
|
)
|