Skip to content

Instantly share code, notes, and snippets.

View Trojaner's full-sized avatar
🔨
Fixing stuff

Enes Sadık Özbek Trojaner

🔨
Fixing stuff
View GitHub Profile
@morgangiraud
morgangiraud / tinygrad-p2p-patched-driver.sh
Created May 2, 2024 11:56
tinygrad-p2p-patched-driver.sh
# this GIST is a follow-up to this previous GIST: https://gist.github.com/morgangiraud/ffa45e76b6891cd4e37e90d75b8be37b
# See the article here: https://morgangiraud.medium.com/multi-gpu-nvidia-p2p-capabilities-and-debugging-tips-fb7597b4e2b5
# It provides some tips and tricks to install Tinygrad patched nvidia open kernel to give P2P capabilities
# to the 40** series!
### Transitioning into complex operations, our aim is to minimize potential issues.
### Important: Verify that the version from nvidia-smi matches exactly what we intend to use.
### At the time of this writing, the reported version is 550.78.
@morgangiraud
morgangiraud / multi-gpu.sh
Last active May 14, 2024 22:57
Script for Ubuntu: Nvidia Multi-GPU Installation and Testing
# Script for Ubuntu: Nvidia Multi-GPU Installation and Testing (Adaptable for other distros)
# Step 0: Clean Nvidia Installation
# If you need to completely remove a previous Nvidia installation, use these commands.
# This ensures that you start with a clean slate for a new installation.
sudo apt-get --purge remove "*nvidia*"
sudo apt-get --purge remove "*cuda*" "*cudnn*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*" "*libnccl*"
# Verify that the removal is complete by checking if any Nvidia, CUDA, or cuDNN packages are still installed.
apt list --installed | grep cuda
@odinhaus
odinhaus / FastCopy.cs
Created November 16, 2016 16:50
Fast C# Byte[] Copier Using Cpblk IL Instruction
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Tests