This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -i python -p "(import ./. { config = { allowUnfree = true; cudaSupport = true; }; }).python3.withPackages (ps: with ps; [ pytorch ])" | |
import torch | |
a = torch.randn(1, 3, 128, 128, device="cuda") | |
torch.nn.functional.conv2d(a, torch.randn(1, 3, 2, 2, device="cuda")) | |
print("ok") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, config, pkgs, ... }: | |
let | |
ldconfig = pkgs.writeScript "ldconfig" '' | |
#! /usr/bin/env bash | |
cleanup() { | |
rm -f "$TMP" | |
} | |
trap cleanup EXIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update \ | |
&& apt-get --yes install curl xz-utils sudo \ | |
&& apt-get clean && rm -rf /var/lib/apt/lists/ \ | |
&& useradd -m -G sudo --password "!" --shell /bin/bash my-user \ | |
&& (echo 'my-user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
from copy import deepcopy | |
from functools import partial | |
from itertools import cycle | |
from pprint import pprint | |
from timeit import timeit | |
from typing import List, Tuple | |
import numpy as np | |
import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc_library( | |
name="downstream", | |
srcs=[ | |
# ... | |
], | |
hdrs=[ | |
# ... | |
], | |
deps=[ | |
"@eigen//:eigen", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc_library( | |
name="doctest", | |
hdrs=["@doctest//file"], | |
visibility=["//visibility:public"], | |
strip_include_prefix = "/external/doctest/file", | |
include_prefix = "doctest", | |
) | |
cc_library( | |
name="downstream", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from functools import partial | |
from dataclasses import dataclass, astuple, asdict | |
from typing import List, Optional, Tuple, Union | |
from warnings import warn | |
from .numutils import unit | |
from .torch_fix import ( | |
Matrices3x4, | |
Matrices4x4, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.