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-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",
|
|
|
|
"gpu_h100_2gpu",
|
|
|
|
],
|
2024-04-18 04:03:03 -07:00
|
|
|
shard_count = 4,
|
2024-09-27 06:14:50 -07:00
|
|
|
tags = ["multiaccelerator"],
|
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-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"),
|
|
|
|
)
|