Skip to content

Instantly share code, notes, and snippets.

View davidcarver's full-sized avatar

David Carver davidcarver

  • Texas Advanced Computing Center
  • The University of Texas at Austin
View GitHub Profile
@garg-aayush
garg-aayush / Steps_multiple_cuda_environments.md
Last active June 2, 2025 08:21
Managing multiple CUDA versions using environment modules in Ubuntu

Steps to manage multiple CUDA environments

Latest Update: May 19th, 2024

This gist contains all the steps required to:

  • Install multiple CUDA versions (e.g., CUDA 11.8 and CUDA 12.1
  • Manage multiple CUDA environments on Ubuntu using the utility called environment modules.
  • Use this approach to avoid CUDA environment conflicts.

Environment Modules is a package that provides for the dynamic modification of a user's environment via modulefiles. You can find more on it at https://modules.readthedocs.io/en/latest/

@koallen
koallen / mlnx_sriov.sh
Last active May 28, 2025 01:45
Script to enable SRIOV virtual functions on Mellanox cards (https://shawnliu.me/post/configuring-sr-iov-for-mellanox-adapters/)
#!/bin/bash
# params
# - device name (e.g. mlx5_0)
# - number of virtual functions (e.g. 10)
configure_dev () {
local num_of_vfs="$2"
local devid=$(echo $1 | cut -d_ -f2)
local max_id="0"
local num_vfs_path="/sys/class/infiniband/$1/device/mlx5_num_vfs"
@nadavrot
nadavrot / Matrix.md
Last active May 19, 2025 10:19
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of