Skip to content

Instantly share code, notes, and snippets.

View mwrnd's full-sized avatar

Matthew Wielgus mwrnd

  • Toronto, Canada
View GitHub Profile
@mwrnd
mwrnd / cmds.py
Created April 12, 2020 06:34
Generate permutations of command-line calls to tensorflow/benchmark's tf_cnn_benchmarks.py script.
"""
Purpose: Generate permutations of command-line calls to
tensorflow/benchmark's tf_cnn_benchmarks.py script.
Usage: 0) place this file in /benchmarks/scripts/tf_cnn_benchmarks
1) python3 cmds.py > benchmarkcommands
2) bash -x <benchmarkcommands 2>&1 | tee benchmarklog
Notes: - XLA and ROCM are options specific to AMD's ROCm
- the associated parse.py will parse log output into summary form
@mwrnd
mwrnd / tesla_k80_lspci_dcgmi_nvidia-smi.txt
Last active January 6, 2023 12:49
Nvidia Tesla K80 lspci dcgmi nvidia-smi
sudo lspci -tv | grep -i "PLX\|Nvidia"
+-01.0-[01-04]----00.0-[02-04]--+-08.0-[03]----00.0 NVIDIA Corporation GK210GL [Tesla K80]
| \-10.0-[04]----00.0 NVIDIA Corporation GK210GL [Tesla K80]
sudo lspci -vvvvxxxxnn | grep -i "PLX\|Nvidia\|LnkSta:"
@mwrnd
mwrnd / MNV303212A-ADIT_mlxreg_Register_Listing.txt
Last active November 9, 2023 01:55
MNV303212A-ADIT mlxreg Register Listing
sudo mst start
sudo mst status
sudo flint -d /dev/mst/mt4119_pciconf0 q
sudo ./mlxup --version
sudo ./mlxup -d /dev/mst/mt4119_pciconf0
sudo mlxreg -d /dev/mst/mt4119_pciconf0 --show_regs | cut -d " " -f 1 | grep "^[A-Z]" | grep -v "Available" | xargs -t -L 1 -I{} sudo mlxreg -d /dev/mst/mt4119_pciconf0 --show_reg {}
@mwrnd
mwrnd / MNV303212A-ADLT_mlxreg_Register_Listing.txt
Last active August 24, 2023 03:50
MNV303212A-ADLT mlxreg Register Listing
sudo mst start
sudo mst status
sudo flint -d /dev/mst/mt4119_pciconf0 q
sudo ./mlxup --version
sudo ./mlxup -d /dev/mst/mt4119_pciconf0
sudo mlxreg -d /dev/mst/mt4119_pciconf0 --show_regs | cut -d " " -f 1 | grep "^[A-Z]" | grep -v "Available" | xargs -t -L 1 -I{} sudo mlxreg -d /dev/mst/mt4119_pciconf0 --show_reg {}
@mwrnd
mwrnd / MNV303212A-ADIT_lspci_vvvnnxxx.txt
Last active August 24, 2023 04:10
MNV303212A-ADIT lspci -vvvnnxxx -d 15b3:
01:00.0 PCI bridge [0604]: Mellanox Technologies MT28800 Family [ConnectX-5 PCIe Bridge] [15b3:1974] (prog-if 00 [Normal decode])
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Bus: primary=01, secondary=02, subordinate=04, sec-latency=0
I/O behind bridge: 0000f000-00000fff [disabled]
Memory behind bridge: fff00000-000fffff [disabled]
Prefetchable memory behind bridge: 00000000a0000000-00000000a7ffffff [size=128M]
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
@mwrnd
mwrnd / xdma_mod_test.c
Created August 30, 2023 05:05
Kernel Module /dev Device Access Test
/* Simple Linux Kernel Module that demonstrates
reads from a /dev/ device created by another
Kernel Module are NOT possible.
/dev/xdma0_c2h_0 requires regular filesystem reads/writes
make
sudo insmod xdma_mod_test.ko
sudo rmmod xdma_mod_test.ko
dmesg