Skip to content

Instantly share code, notes, and snippets.

View LiberiFatali's full-sized avatar

Cless LiberiFatali

  • Vietnam
View GitHub Profile
@LiberiFatali
LiberiFatali / intel-nvidia-offload-rendering.md
Created September 20, 2022 08:18 — forked from haipnh/intel-nvidia-offload-rendering.md
Intel for display, NVIDIA for computing and offload rendering

Purposes

  1. iGPU will be used for main display and rendering daily-use softwares in default
  2. Dedicated GPUs will be used for computing or offload rendering
  3. Reduce the used VRAM of Dedicated GPU, which is mostly used for X11 server rendering

Tested Hardware Configuration

OS: Ubuntu 18.04.4 LTS
Mainboads
├── iGPU
@LiberiFatali
LiberiFatali / intel-nvidia.md
Created September 20, 2022 08:17 — forked from wangruohui/intel-nvidia.md
Intel for display, Nvidia for computing

Intel for display, NVIDIA for computing

This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 / 20.04 desktop.

I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti. Both of them can be shown via lspci | grep VGA.

00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
@LiberiFatali
LiberiFatali / triple-birthday-problem.ipynb
Created April 20, 2020 01:50
Triple birthday problem.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LiberiFatali
LiberiFatali / install-cuda-10-bionic.sh
Created September 9, 2019 08:54 — forked from bogdan-kulynych/install-cuda-10-bionic.sh
Install CUDA 10 on Ubuntu 18.04
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
import numpy as np
import faiss
def search_knn(xq, xb, k, distance_type=faiss.METRIC_L2):
""" wrapper around the faiss knn functions without index """
nq, d = xq.shape
nb, d2 = xb.shape
assert d == d2
@LiberiFatali
LiberiFatali / su.py
Created February 7, 2018 08:49 — forked from pebbie/su.py
Implementation of document binarization algorithm by (Bolan Su et al, 2010)
"""
author: Peb Ruswono Aryan
Binarization Algorithm by Su et al.
@inproceedings{Su:2010:BHD:1815330.1815351,
author = {Su, Bolan and Lu, Shijian and Tan, Chew Lim},
title = {Binarization of Historical Document Images Using the Local Maximum and Minimum},
booktitle = {Proceedings of the 9th IAPR International Workshop on Document Analysis Systems},
series = {DAS '10},