Skip to content

Instantly share code, notes, and snippets.

@pxl-th
pxl-th / juli-amdgpu-mwe.md
Last active December 7, 2022 18:46
AMDGPU.jl allocation error MWE
  1. Download Julia 1.9.0-alpha1: https://julialang.org/downloads/#upcoming_release

  2. Launch Julia REPL: /julia-folder/bin/julia

  3. Install AMDGPU package: ]add AMDGPU (notice ] symbol that you should also type).
    By default it will use its own ROCm 5.2.3 artifacts instead of whatever is installed on your system.
    Use <ctrl+d> to exit REPL.

  4. Create a main.jl anywhere with the following code in it:

using AMDGPU
@pxl-th
pxl-th / bundle_adjustment.jl
Last active September 1, 2021 14:21
Bundle Adjustment
using GLMakie
using SparseArrays
using SparseDiffTools
using LeastSquaresOptim
function project(camera_params, point)
projection = RotationVec(camera_params[1:3]...) * point
projection += camera_params[4:6]
projection = -projection[1:2] ./ projection[3]