Skip to content

Instantly share code, notes, and snippets.

@catbraincell
catbraincell / open3d_build_win10_python3.11.md
Last active May 6, 2023 08:38
Build Open3D from source on Windows 10 and Python 3.11
@catbraincell
catbraincell / rocm_pytorch_on_amd_integrated_gpu.md
Last active October 22, 2025 19:50
Use ROCm and PyTorch on AMD integrated graphics (iGPU, Ryzen 7 5825u)

UNVERIFIED YET - WAIT FOR UPDATES

pytorch/pytorch#94891 (comment) The pcie atomic issue should be fixed already. Currently i cannot verify.

  1. Install PyTorch with ROCm support
    Following offical installation guide: https://pytorch.org/get-started/locally/#linux-installation
    Choose [Stable] -> [Linux] -> [Pip] -> [Python] -> [ROCm], It should be something like:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2
@catbraincell
catbraincell / XilinxBitHeaderParser.hpp
Last active March 5, 2023 09:50
Xilinx .bit file header parser
class HeaderParser {
private:
uint8_t state;
//0=header len, 1=header data,
//2=key, 3=length, 4=value,
//5=bitstream len, 6=bitstream
uint32_t len;
uint8_t n;
uint8_t key;
@catbraincell
catbraincell / Xilinx_bit_file_explained.txt
Last active March 5, 2023 09:33
Internal structure of Xilinx bitstream (.bit) file
The Xilinx .bit format is pretty simple. It uses keys and lengths to
divide the file.
Parser source code: https://gist.github.com/warmonkey/49dd574fda39f88b5eed5edc92707cf2
Here is an example. Below is a hex dump from the beginning of a .bit file:
00000000: 00 09 0f f0 0f f0 0f f0 0f f0 00 00 01 61 00 0a .............a..
00000010: 78 66 6f 72 6d 2e 6e 63 64 00 62 00 0c 76 31 30 xform.ncd.b..v10
00000020: 30 30 65 66 67 38 36 30 00 63 00 0b 32 30 30 31 00efg860.c..2001