Skip to content

Commit

Permalink
mark xmap as an API boundary; filter experimental.maps from trace…
Browse files Browse the repository at this point in the history
…backs and source info
  • Loading branch information
froystig committed Mar 17, 2022
1 parent 5d7f639 commit a6841a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jax/experimental/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
_ensure_index_tuple, donation_vector,
shaped_abstractify)
from jax._src import source_info_util
from jax._src import traceback_util
from jax._src.config import config
from jax.errors import JAXTypeError
from jax.experimental.global_device_array import GlobalDeviceArray, _get_array_mapping
Expand All @@ -52,6 +53,9 @@
tuple_insert, moveaxis, split_list, wrap_name)
from jax import lax

source_info_util.register_exclusion(__file__)
traceback_util.register_exclusion(__file__)

map, unsafe_map = safe_map, map
zip = safe_zip

Expand Down Expand Up @@ -667,7 +671,8 @@ def lower(*args):
computation, in_tree, in_avals, out_tree(), donate_argnums,
no_kwargs=True)

fun_mapped = wraps(fun)(decorate_serial(fun_mapped))
fun_mapped = wraps(fun)(
traceback_util.api_boundary(decorate_serial(fun_mapped)))
fun_mapped.lower = decorate_serial(lower)

return fun_mapped
Expand Down

0 comments on commit a6841a9

Please sign in to comment.