I hereby claim:
- I am leofang on github.
- I am leofang (https://keybase.io/leofang) on keybase.
- I have a public key ASCZZ6NP9Kjx8B_n1wSCGFk3VCeEqKI2g7CAiIrhaAKcsAo
To claim this, I am signing this object:
import cupy as cp | |
from pycuda import gpuarray | |
import pycuda.autoinit # this import creates a CUDA context! | |
def from_cupy(arr): | |
shape = arr.shape | |
dtype = arr.dtype | |
# a dummy object always returns the underlying pointer address |
I hereby claim:
To claim this, I am signing this object:
import sys | |
import warnings | |
warnings.filterwarnings("ignore", category=FutureWarning) | |
import numpy as np | |
import cupy as cp | |
from cupyx.time import repeat | |
shape = (256, 512, 512) |
# Many Python libraries provide low-level CUDA support, but when it comes to interoperability | |
# things get complicated. This script shows a simple example on converting a CUDA stream | |
# created from CuPy's API to one that is compatible with Numba. | |
from numba import cuda | |
import cupy as cp | |
def stream_cupy_to_numba(cp_stream): |
# build locally at the root of cthyb-ohmic: | |
# docker build --build-arg arg_build_time="$(date +"%b. %d, %T %Z, %Y")" --squash -t leofang/cthyb-ohmic . | |
FROM centos:latest | |
# get cthyb-ohmic; this layer will expose the source, so remember to squash when building! | |
ADD . /opt/cthyb-ohmic/ | |
# get alps; note the pipe slot after tar | |
RUN curl -s http://alps.comp-phys.org/static/software/releases/alps-2.2.b3-r7462-src-with-boost.tar.gz | \ | |
tar -xzf - -C /opt/ |