Skip to content

Instantly share code, notes, and snippets.

View d4l3k's full-sized avatar
⛰️
Hi

Tristan Rice d4l3k

⛰️
Hi
View GitHub Profile
============================= test session starts ==============================
platform linux -- Python 3.11.4, pytest-7.4.2, pluggy-1.3.0
rootdir: /mnt/ext/torchdrive
plugins: anyio-4.0.0, typeguard-2.13.3, xdist-3.3.1
collected 2 items / 1 deselected / 1 selected
torchworld/transforms/test_sfm.py F [100%]
=================================== FAILURES ===================================
_____________________________ TestSFM.test_export ______________________________
[50/67] g++-12 -MMD -MF /tmp/pip-req-build-y8fv0d6c/build/temp.linux-x86_64-3.11/tmp/pip-req-build-y8fv0d6c/pytorch3d/csrc/
pulsar/host/renderer.norm_sphere_gradients.cpu.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DWITH_CUDA -DTHRUST_IGNORE
_CUB_VERSION_CHECK -I/tmp/pip-req-build-y8fv0d6c/pytorch3d/csrc -I/home/rice/venvs/torchdrive3.11/lib/python3.11/site-packages/to
rch/include -I/home/rice/venvs/torchdrive3.11/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/home/rice/venv
s/torchdrive3.11/lib/python3.11/site-packages/torch/include/TH -I/home/rice/venvs/torchdrive3.11/lib/python3.11/site-packages/tor
ch/include/THC -I/opt/cuda/include -I/home/rice/venvs/torchdrive3.11/include -I/home/rice/.pyenv/versions/3.11.4/include/python3.
11 -c -c /tmp/pip-req-build-y8fv0d6c/pytorch3d/csrc/pulsar/host/renderer.norm_sphere_gradients.cpu.cpp -o /tmp/pip-req-build-y8fv
0d6c/build/temp.linux-x86_64-3.11/tmp/pip-req-build-y8fv0d6c/pytorch3d/csrc/pulsar/host/renderer.norm_sphere_gradi
@d4l3k
d4l3k / benchmark.py
Created December 12, 2024 17:45
torch.save/load benchmark and streaming implementation
from dataclasses import dataclass
import pickle
from io import BufferedIOBase
from typing import Tuple
import tempfile
import time
import struct
import torch
from torch.utils._pytree import tree_flatten, tree_unflatten