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 / 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
@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 / 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_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 / 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 / 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 / parse.py
Last active April 12, 2020 06:35
Process the output logs of multiple calls to tensorflow/benchmark's tf_cnn_benchmarks.py v2.1 script into an easy-to-read summary.
"""
# Copyright 2020 Matthew Wielgus. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@mwrnd
mwrnd / parse.py
Created October 23, 2019 20:25
Process the output logs of multiple calls to tensorflow/benchmark's tf_cnn_benchmarks.py script into an easy-to-read summary.
"""
# Copyright 2019 Matthew Wielgus. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@mwrnd
mwrnd / cmds.py
Created October 23, 2019 20:23
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: 00) sudo pip install future
0) place this file in /benchmarks/scripts/tf_cnn_benchmarks
1) python cmds.py > benchmarkcommands
2) bash -x <benchmarkcommands 2>&1 | tee benchmarklog
Notes: - XLA and ROCM are options specific to AMD's ROCm
@mwrnd
mwrnd / benchmark_results_RX580_ROCm1.9.3
Created October 23, 2019 20:19
AMD Radeon RX 580 Tensorflow benchmarking results with ROCm 1.9.3
AMD Radeon RX 580 8GB tensorflow/benchmarks Results
By Matthew Wielgus 2019-10-22
Video Card: MSI Radeon RX 580 8GB ARMOR OC (rocm-smi -v Cannot get VBIOS version)
Motherboard: MSI X570-A Pro with 32GB DDR4-2133 BIOS H.40
Processor: AMD Ryzen 5 3600X
OS: Ubuntu 18.04.0 no apt upgrade or apt dist-upgrade
Kernel: 4.15.0-20-generic
rocm-dkms: 1.9.3 installed through apt