question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API for surfacing active SPMD axis names

See original GitHub issue

For example,

@partial(pmap, axis_name="i")
def foo():
  @partial(pmap, axis_name="j")
  def bar():
    print(lax.axis_names())  # ("i", "j")

The semantics would be “the set of axis names currently valid inside a psum or axis_index”; the order would be the pmap nesting order. cc @dmrd

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mattjjcommented, May 1, 2020

Regarding implementation, I think we should move the axis env to be part of the tracer state in core.py, for at least two reasons:

  1. it centralizes the global state, which is useful when forming thunks, and
  2. it’ll let vmap easily reuse the same axis environment.
0reactions
shoyercommented, May 1, 2020

Another weird bit: this would be like functions being able to ask “how deep in the call stack am I?”

Yeah, this worries me a bit. This feels like a feature that might be good not to have, to ensure compositionality.

The batch normalization use case is real, though. I wonder if there could be a more hygenic way to do support this, e.g., only surfacing active axis names defined by a particular library?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction — Advanced Ray Tracing documentation
The Embree API is a low-level C99 ray tracing API which can be used to construct 3D scenes and perform ray queries of...
Read more >
(PDF) Active Pharmaceutical Ingredients and Aquatic Organisms
The presence of active pharmaceuticals ingredients (APIs) in aquatic systems has led in recent years to a burgeoning literature examining ...
Read more >
Introduction to MPI
Message passing (and MPI) is for MIMD/SPMD parallelism. ... Communication and synchronization are combined; Push model (active data transfer). Process 0.
Read more >
Active Pharmaceutical Ingredients and Aquatic Organisms - EPA
The presence of active pharmaceuticals ingredients (APIs) in aquatic systems has led in recent ... toxicity in surface waters, and whole effluent toxicity....
Read more >
Developer and Optimization Guide for Intel® Processor ...
The document also provides specific API guidance for using the latest graphics APIs on Intel Processor Graphics Gen11.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found