diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8eb39a40..eb58a453 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/pixi.lock b/pixi.lock index 8347b2b1..155d0695 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1161,7 +1161,7 @@ packages: name: b3d version: 0.1.0 path: . - sha256: 46cc1dab2605b961a66832f7fe706d2c42c0a00071351f05515ed3e11925c65c + sha256: bd499079dca5e9c73428bcde4d886ca7364b4d7d7cb10302af56961647479955 requires_dist: - genjax==0.5.0.post13.dev0+973fb60d - opencv-python>=4.10.0.84,<4.10.1 diff --git a/pyproject.toml b/pyproject.toml index 20c96c30..8ffce339 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"} } diff --git a/src/b3d/renderer/nvdiffrast/jax/ops.py b/src/b3d/renderer/nvdiffrast/jax/ops.py index d3b781e9..e42d18d4 100644 --- a/src/b3d/renderer/nvdiffrast/jax/ops.py +++ b/src/b3d/renderer/nvdiffrast/jax/ops.py @@ -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 )