2140 Commits

Author SHA1 Message Date
jax authors
c0dacbf724 Merge pull request #23484 from justinjfu:pallas_prefetch_docs
PiperOrigin-RevId: 672538687
2024-09-09 07:33:57 -07:00
Justin Fu
51a666fb8c [Pallas] Update Pallas docs with new figures and TPUCompilerParams 2024-09-06 14:30:29 -07:00
Dan Foreman-Mackey
bcbc0962bb Add the FFI functions and tutorial to the changelog.
Although we soft launched the FFI with v0.4.31, it would be nice to
include an update in the changelog to help with visibility.
2024-09-06 12:30:28 -04:00
jax authors
d776f1da76 Merge pull request #23470 from gnecula:poly_fix_eq_constraints
PiperOrigin-RevId: 671727351
2024-09-06 05:53:53 -07:00
George Necula
0d8ffd33ab [shape_polyO] Improve handling of equality shape constraints
This fixes several bugs in presence of equality constraints where
the left-hand side is just a dimension variable.

First, such constraints were not applied when parsing variables.
Now, with a constraint `a == b` when we parse "a" we obtain `b`.

Second, when we evaluate symbolic dimensions that contain
dimension variables that are constrained to be equal to something
else, we may fail to find the dimension variable in the environment
because the environment construction has applied the constraints.
We fix this by looking up the unknown dimension variable in
the equality constraints.

Fixes: #23437
Fixes: #23456
2024-09-06 13:55:38 +03:00
jax authors
b6031a9c82 Merge pull request #23454 from carlosgmartin:shape_polymorphism_docs_fix_division_parentheses
PiperOrigin-RevId: 671697208
2024-09-06 03:33:33 -07:00
jax authors
25ef8ac015 Merge pull request #23107 from ykirpichev:add_xla_flags_md
PiperOrigin-RevId: 671580619
2024-09-05 18:31:25 -07:00
jax authors
107cacafbc Merge pull request #23466 from hawkinsp:optbarrier
PiperOrigin-RevId: 671567949
2024-09-05 17:35:00 -07:00
Peter Hawkins
9c86fdec02 Make optimization_barrier a public lax API. 2024-09-06 00:18:57 +00:00
Frederik Wilde
d08b68996a
Update jax-primitives.md 2024-09-05 21:29:56 +02:00
Frederik Wilde
be4383b3f9 Typo 2024-09-05 20:47:40 +02:00
carlosgmartin
104ebc2e90 Fix expression parentheses in shape polymorphism docs for division of symbolic dimensions. 2024-09-05 10:31:45 -04:00
Yury Kirpichev
f9204e6311 Add md page about XLA&XLA_FLAGS in JAX 2024-09-05 09:27:32 +00:00
Jake VanderPlas
87c78f8ece doc: update examples of deprecation timelines 2024-09-03 16:30:43 -07:00
Jake VanderPlas
7569dd5438 Update sharded-computation doc to use make_mesh() 2024-09-03 16:04:23 -07:00
jax authors
2a42bbe48a Merge pull request #22843 from jeertmans:scipy-special-fresnel
PiperOrigin-RevId: 670543225
2024-09-03 07:07:19 -07:00
Jérome Eertmans
f9cb95ca08
feat(lib): add real-valued implementation of jax.scipy.special.fresnel
Add implementation, documentation, and tests, for both single-precision and double-precision floating-point arithmetic.
2024-09-03 09:50:19 +02:00
Roy Frostig
180573a8c8 docs: tweak JAX-Toolbox url anchor for clarity 2024-08-28 11:23:51 -07:00
Roy Frostig
7b29791200 docs: shorten/clarify some page titles
Shorten the titles for derivative rules and manual parallelism, and go
for canonical wording in the parallel programming intro (typically we
"shard" data, and "partition" computation, as part of parallel
programming).
2024-08-28 11:22:06 -07:00
Roy Frostig
42de34263f docs: runtime debugging tweaks
Mainly make titles/headings easier to read, by swapping code for words
and not using headings as links.
2024-08-28 11:04:14 -07:00
Roy Frostig
763d600508 docs: remove inline authors/dates on misc doc pages
Git history covers this better and automatically.
2024-08-28 11:04:14 -07:00
Roy Frostig
672a013b3a docs: prefer "summary" to "tl;dr"
This was common and we typically just mean "summary."
2024-08-28 11:04:14 -07:00
Jake VanderPlas
09fd345de9 pre-commit: update hooks & pin using hashes 2024-08-27 15:23:13 -07:00
Jake VanderPlas
68be5b5085 CI: update ruff to v0.6.1 2024-08-27 14:54:11 -07:00
jax authors
be6e1549c3 Merge pull request #23207 from carlosgmartin:docs-jacobian-tall-wide
PiperOrigin-RevId: 667797293
2024-08-26 19:15:49 -07:00
carlosgmartin
f812d0f28b Clarify meaning of tall and wide Jacobian matrices in autodiff docs. 2024-08-26 16:00:36 -07:00
Peter Hawkins
6d1f51e63d Clean up BUILD files.
PiperOrigin-RevId: 667604964
2024-08-26 09:11:17 -07:00
Jake VanderPlas
f04a35bda5 Update jax landing page 2024-08-20 13:03:08 -07:00
jax authors
3e764f617a [shard_map docs]: Fix doc typos
PiperOrigin-RevId: 664960613
2024-08-19 13:45:46 -07:00
Ayaka
36739e84ce Normalize "interpreter mode" to "interpret mode", and "InterpreterTest" to "InterpretTest"
This is because both "interpret mode" and "interpreter mode" occur in code, and "interpret mode" is more frequent.

PiperOrigin-RevId: 664873359
2024-08-19 10:40:22 -07:00
Vadym Matsishevskyi
60cc041133 Minor fixes and documentation update for custom hermetic Python interpreter support.
PiperOrigin-RevId: 663784042
2024-08-16 10:54:00 -07:00
Jake VanderPlas
e9d6fd3795 document jax.Array methods and attributes 2024-08-16 06:37:19 -07:00
jax authors
88ed579704 Merge pull request #23039 from froystig:docs3
PiperOrigin-RevId: 663427005
2024-08-15 13:22:04 -07:00
Jake VanderPlas
91f5512965 Document methods of custom_jvp/custom_vjp 2024-08-14 15:37:20 -07:00
jax authors
599c13aa09 Introduce hermetic CUDA in Google ML projects.
1) Hermetic CUDA rules allow building wheels with GPU support on a machine without GPUs, as well as running Bazel GPU tests on a machine with only GPUs and NVIDIA driver installed. When `--config=cuda` is provided in Bazel options, Bazel will download CUDA, CUDNN and NCCL redistributions in the cache, and use them during build and test phases.

    [Default location of CUNN redistributions](https://developer.download.nvidia.com/compute/cudnn/redist/)

    [Default location of CUDA redistributions](https://developer.download.nvidia.com/compute/cuda/redist/)

    [Default location of NCCL redistributions](https://pypi.org/project/nvidia-nccl-cu12/#history)

2) To include hermetic CUDA rules in your project, add the following in the WORKSPACE of the downstream project dependent on XLA.

   Note: use `@local_tsl` instead of `@tsl` in Tensorflow project.

   ```
   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
      "cuda_json_init_repository",
   )

   cuda_json_init_repository()

   load(
      "@cuda_redist_json//:distributions.bzl",
      "CUDA_REDISTRIBUTIONS",
      "CUDNN_REDISTRIBUTIONS",
   )
   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
      "cuda_redist_init_repositories",
      "cudnn_redist_init_repository",
   )

   cuda_redist_init_repositories(
      cuda_redistributions = CUDA_REDISTRIBUTIONS,
   )

   cudnn_redist_init_repository(
      cudnn_redistributions = CUDNN_REDISTRIBUTIONS,
   )

   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
      "cuda_configure",
   )

   cuda_configure(name = "local_config_cuda")

   load(
      "@tsl//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
      "nccl_redist_init_repository",
   )

   nccl_redist_init_repository()

   load(
      "@tsl//third_party/nccl/hermetic:nccl_configure.bzl",
      "nccl_configure",
   )

   nccl_configure(name = "local_config_nccl")
   ```

PiperOrigin-RevId: 662981325
2024-08-14 10:58:43 -07:00
Roy Frostig
12eebfe8d4 docs: reorganize sections
* Create "extension guides" section
* Sort developer notes into subsections
* Move examples from advanced section into user guides
* Reorder some listings, adjust some titles
2024-08-13 21:33:45 -07:00
Roy Frostig
d17edb4c4d docs: fix shard_map guide headings
These were off by one level, causing section titles to be listed in
the guide index.
2024-08-13 18:29:42 -07:00
jax authors
d2b85a48af Merge pull request #23036 from froystig:docs2
PiperOrigin-RevId: 662635310
2024-08-13 13:40:19 -07:00
Roy Frostig
3c223cd253 docs: tidy up titles and headings
This shortens some titles and makes them more consistent. It also
removes "JAX" from several titles ("in JAX", "for JAX", "JAX's",
etc.). Since these are JAX docs, that ought to be clear from context.
2024-08-13 11:53:57 -07:00
jax authors
23effba503 Merge pull request #23027 from froystig:docs
PiperOrigin-RevId: 662392585
2024-08-12 23:59:39 -07:00
Roy Frostig
09e73118bf docs: more sentence case 2024-08-12 20:07:49 -07:00
jax authors
833560deb1 Merge pull request #23023 from froystig:docs3
PiperOrigin-RevId: 662318149
2024-08-12 19:03:12 -07:00
Roy Frostig
b8f8b7b07f docs: sentence case page titles, section headings, some content 2024-08-12 18:12:17 -07:00
Roy Frostig
2644299f7e docs: sentence case index and sub-index headings
We currently use both forms, so for consistency (and easier reading),
pick this one.
2024-08-12 13:52:43 -07:00
Dan Foreman-Mackey
60bf5b7727 Add a jax.process_indices function.
The `jax.host_ids` function has be long deprecated, but the suggested alternative of `list(range(jax.process_count()))` relies on the current behavior that the list of process indices is always dense. In the future we may want to allow dynamic addition and removal of processes in which case `jax.process_count` and `jax.process_indices` would need to be updated, and it is useful for users to be able to use this forward-compatible interface.

PiperOrigin-RevId: 662142636
2024-08-12 10:30:41 -07:00
jax authors
d2fa88496d Merge pull request #22991 from froystig:keys2
PiperOrigin-RevId: 661891112
2024-08-11 16:08:44 -07:00
jax authors
312ebdb8ba Merge pull request #22989 from froystig:keys
PiperOrigin-RevId: 661890876
2024-08-11 16:08:25 -07:00
Roy Frostig
dd535d88a7 emphasize typed over legacy RNG keys in random module docs
Update both docstrings and move the `PRNGKey` function listing lower
in the API reference.
2024-08-11 12:41:50 -07:00
Roy Frostig
371935cc10 update README and several docs to typed RNG keys 2024-08-11 08:09:47 -07:00
Roy Frostig
ded5b5366b indent consistently in auto-parallelization and shard_map tutorials 2024-08-11 08:04:14 -07:00