From c7e922c259b78f5ae753f747c3a97476e8485632 Mon Sep 17 00:00:00 2001 From: Stephannie Jimenez Date: Thu, 20 Jan 2022 11:31:22 -0500 Subject: [PATCH] Transform data dependent output shapes md to rst --- ...ut_shapes.md => data_dependent_output_shapes.rst} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename spec/design_topics/{data_dependent_output_shapes.md => data_dependent_output_shapes.rst} (63%) diff --git a/spec/design_topics/data_dependent_output_shapes.md b/spec/design_topics/data_dependent_output_shapes.rst similarity index 63% rename from spec/design_topics/data_dependent_output_shapes.md rename to spec/design_topics/data_dependent_output_shapes.rst index d8347520d..43daa9765 100644 --- a/spec/design_topics/data_dependent_output_shapes.md +++ b/spec/design_topics/data_dependent_output_shapes.rst @@ -1,6 +1,7 @@ -(data-dependent-output-shapes)= +.. _data-dependent-output-shapes: -# Data-dependent output shapes +Data-dependent output shapes +============================ Array libraries which build computation graphs commonly employ static analysis that relies upon known shapes. For example, JAX requires known array sizes when compiling code, in order to perform static memory allocation. Functions and operations which are value-dependent present difficulties for such libraries, as array sizes cannot be inferred ahead of time without also knowing the contents of the respective arrays. @@ -8,8 +9,7 @@ While value-dependent functions and operations are not impossible to implement f Value-dependent operations are demarcated in this specification using an admonition similar to the following: -:::{admonition} Data-dependent output shape -:class: important +.. admonition:: Data-dependent output shape + :class: important -The shape of the output array for this function/operation depends on the data values in the input array; hence, array libraries which build computation graphs (e.g., JAX, Dask, etc.) may find this function/operation difficult to implement without knowing array values. Accordingly, such libraries may choose to omit this function. See {ref}`data-dependent-output-shapes` section for more details. -::: + The shape of the output array for this function/operation depends on the data values in the input array; hence, array libraries which build computation graphs (e.g., JAX, Dask, etc.) may find this function/operation difficult to implement without knowing array values. Accordingly, such libraries may choose to omit this function. See :ref:`data-dependent-output-shapes` section for more details.