Open 8bitmp3 opened 4 years ago
Hi - thanks for the suggestion! I think that sort of documentation would be very useful. Feel free to submit a pull request!
Cheers @jakevdp. Do you know what the default temporary output folder is during JAX runs, so that we can link TB to it? PyTorch has SummaryWriter
that saves logs in ./runs/
, for example.
I'm not sure whether JAX has any built-in mechanism for saving intermediate outputs.
Hi , @8bitmp3 , thanks for the instructions. It works for me when I profiled my JAX program run on GPU. However, for profiling the programs run on TPU, it seems that some steps are required to modify. It would be awesome if Colab JAX profiling instructions specifically for TPU are provided in the future.
On this note, does anyone have some simple code for getting the memory profiling working in colab? The go requirement seems to complicate things a bit.
@akshay-jaggi
# This will install it
!add-apt-repository ppa:longsleep/golang-backports -y
!apt update
!apt install golang-go
%env GOPATH=/root/go
!apt-get install graphviz gv
!go install github.com/google/pprof@latest
# Do stuff / profile as per guide
# This will save the output to a png
!go tool pprof -png memory.prof ```
Hi,
Is there a method to export the results of the memory profiler (https://jax.readthedocs.io/en/latest/device_memory_profiling.html) to a file, e.g. csv?
Thank you!
@8bitmp3
@jakevdp @skye if it's worth revisiting, feel free to assign to @8bitmp3
Just a +1 that this would be very useful. I was also unable to profile on Colab with TPU
Hi š What do you think about having a JAX Profiling in Colab notebook as an add-on to the current JAX Profiling guide (https://jax.readthedocs.io/en/latest/profiling.html)?
Also, do you know how and where the data get captured in the temp Colab Compute Engine instance's Linux folder hierarchy, so that we can point TB's
--logdir
flag to it for reading? For example, with TF, you set such dir when instantiating a callback.To give you an idea of what a Colab guide would look like:
jax.profiler
:1234
that the TensorBoard instance can connect to:(In the non-Colab JAX profiling instructions, this step is similar to step 2:
import jax.profiler
andjax.profiler.start_server(9999)
)(In the non-Colab JAX profiling instructions, this step is step 1)
[Note: currently, it's not possible to perform the next steps, as the log files cannot be found - the web UI says INACTIVE - see my question at the top of this "Issue".]
Load TensorBoard at
localhost:1234
:localhost:1234
in the Profile Service URL fieldCapture: