Skip to content

Instantly share code, notes, and snippets.

Avatar

Ayush Kumar AK-ayush

View GitHub Profile
View e2e_text_classification_gpu.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AK-ayush
AK-ayush / numba_to_pytorch.py
Last active Feb 3, 2020
convert numba cuda array to pytorch tensor
View numba_to_pytorch.py
from numba import cuda
import ctypes
import numpy as np
import torch
def devndarray2torch(dev_arr):
t = torch.empty(size=dev_arr.shape, dtype=dtyp).cuda()
ctx = cuda.cudadrv.driver.driver.get_context()
# constant value of #bytes in case of float32 = 4
@AK-ayush
AK-ayush / steps_cuml.txt
Last active May 10, 2021
rapids'cuml on google colab
View steps_cuml.txt
BEFORE INSTALLING THE CUML, PLEASE MAKE SURE YOU HAVE FOLLOWED THE ABOVE STEPS FOR CUDF. CUDF SHOULD BE WORKING...
Step 1: Install the cuml and its depandencies.
!apt install libopenblas-base libomp-dev
!pip install cuml-cuda100
# import cuml at this point, will give libcuml.so not found error. #
NOTE: Step2 is optional and is just for information, you can fast forward to Step3 directly to work quickely.
@AK-ayush
AK-ayush / steps_cudf.txt
Last active Feb 9, 2020
rapids'cudf on google colab
View steps_cudf.txt
Steps 1: Just to verify that you have all requirement satisfied, needed by rapids.
* check the gpu card (>=Pascal arch)
!nvidia-smi
* check cuda version installed (>=9.2)
!nvcc -V
*check the python and pip version (python==3.6)
!python -V; pip -V
@AK-ayush
AK-ayush / dask_custring.ipynb
Last active Mar 14, 2019
Final version with suggested solution
View dask_custring.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.