Skip to content

Commit

Permalink
Refactor configs (#54)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Charles Zhang <charleszhang@holylogin04.rc.fas.harvard.edu>
  • Loading branch information
2 people authored and jf514 committed Oct 5, 2024
1 parent 57174a8 commit 1059c1a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions stac_mjx/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
import h5py
from pathlib import Path
from omegaconf import DictConfig
from jax.lib import xla_bridge
import os


def enable_xla_flags():
"""Enables XLA Flags for faster runtime on Nvidia GPUs."""
if xla_bridge.get_backend().platform == "gpu":
os.environ["XLA_FLAGS"] = (
"--xla_gpu_enable_triton_softmax_fusion=true "
"--xla_gpu_triton_gemm_any=True "
)


def load_data(cfg: DictConfig, base_path: Union[Path, None] = None):
"""Main mocap data file loader interface.
Expand Down

0 comments on commit 1059c1a

Please sign in to comment.