Skip to content

Commit

Permalink
logging ops
Browse files Browse the repository at this point in the history
  • Loading branch information
eightysteele committed Jul 18, 2024
1 parent b62698a commit 8a48015
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
source ~/.bashrc
export PATH="/home/runner/.pixi/bin:/home/runner/.local/bin:$PATH"
export CPLUS_INCLUDE_PATH="$GITHUB_WORKSPACE/.pixi/envs/default/targets/x86_64-linux/include"
sudo cp -v "$GITHUB_WORKSPACE/assets/system/10_nvidia.json" /usr/share/glvnd/egl_vendor.d/
#sudo cp -v "$GITHUB_WORKSPACE/assets/system/10_nvidia.json" /usr/share/glvnd/egl_vendor.d/
pixi tree
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
env
pixi run -vv test-ci
Expand Down
2 changes: 1 addition & 1 deletion pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ b3d-pull = {cmd = "python b3d_pull.py -ow", cwd = "src/b3d/bucket_utils" }

rerun = "rerun --port 8812"

test = { cmd = "pytest -s --log-cli-level=DEBUG tests/dense_model_unit_tests/triangle_depth_posterior/test_triangle_depth_posterior.py", env = { XLA_PYTHON_CLIENT_PREALLOCATE = "false", XLA_PYTHON_CLIENT_ALLOCATOR = "platform", CPLUS_INCLUDE_PATH = "./targets/x86_64-linux/include", TORCH_CUDA_ARCH_LIST = "8.9", LD_LIBRARY_PATH = "/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" } }
test = { cmd = "pytest -s --log-cli-level=WARN tests/dense_model_unit_tests/triangle_depth_posterior/test_triangle_depth_posterior.py", env = { XLA_PYTHON_CLIENT_PREALLOCATE = "false", XLA_PYTHON_CLIENT_ALLOCATOR = "platform", CPLUS_INCLUDE_PATH = "./targets/x86_64-linux/include", TORCH_CUDA_ARCH_LIST = "8.9", LD_LIBRARY_PATH = "/usr/lib/x86_64-linux-gnu" } }

test-ci = { cmd = "pytest -s --log-cli-level=DEBUG tests/dense_model_unit_tests/triangle_depth_posterior/test_triangle_depth_posterior.py", env = { XLA_PYTHON_CLIENT_PREALLOCATE = "false", XLA_PYTHON_CLIENT_ALLOCATOR = "platform", TORCH_CUDA_ARCH_LIST = "8.9"} }

Expand Down
7 changes: 7 additions & 0 deletions src/b3d/renderer/nvdiffrast/jax/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ def __init__(self, output_db=True, mode="automatic", device=None):
else:
with torch.cuda.device(device):
cuda_device_idx = torch.cuda.current_device()

plugin = _get_plugin(gl=True)

logging.getLogger("nvdiffrast").warning(
f"cuda_device_idx: {cuda_device_idx}, plugin: {plugin}, gl: {plugin.RasterizeGLStateWrapper}"
)

self.cpp_wrapper = _get_plugin(gl=True).RasterizeGLStateWrapper(
output_db, mode == "automatic", cuda_device_idx
)
Expand Down

0 comments on commit 8a48015

Please sign in to comment.