Skip to content

Instantly share code, notes, and snippets.

View lukego's full-sized avatar

Luke Gorrie lukego

View GitHub Profile
@lukego
lukego / 14_12_1220_syndrome_list.log
Created August 15, 2016 08:51
Mellanox error syndrome lists
BAD_RES_STATE | 0x25B161 | destroy_ctx - context doesn't exist or doesn't match type
BAD_RES_STATE | 0x4A6FC9 | destroy_ctx - context in use
BAD_RES_STATE | 0x60DA55 | destroy_dct - dct not in drained state
BAD_PARAM | 0x67A6F2 | slrg doesnt support write;
BAD_PARAM | 0x0F0E35 | ppamp doesnt support write;
BAD_PKT | 0x4A22F | access reg MAD with specified register id not supported
BAD_PKT | 0x16C592 | mad_ifc: process_smp_lid mkey check failed - silently discarded
INTERNAL_ERR | 0x079233 | set_get_port_info: silently discarded.
BAD_PKT | 0x468496 | mad_ifc: ATTRV_SM_INFO handled by SW
BAD_PKT | 0x071808 | mad_ifc: smp trap repress silently discarded after processing.
00000000 58 6c 78 56 31 38 45 42 20 20 20 20 66 61 30 30 |XlxV18EB fa00|
00000010 20 20 20 20 31 66 38 30 d0 fe 94 36 80 ab 3d 31 | 1f80...6..=1|
00000020 a2 b6 49 bc 2f f7 15 e7 6b a7 bf 46 64 f3 d3 68 |..I./...k..Fd..h|
00000030 82 d1 fa 70 df 92 26 32 73 d6 20 72 db 9c 61 41 |...p..&2s. r..aA|
00000040 72 c7 80 9a 5d 21 39 2b c8 82 cb 4f 75 10 6e 7e |r...]!9+...Ou.n~|
00000050 f2 5a b2 c4 95 bf d5 a1 84 52 9f d0 43 0a be fc |.Z.......R..C...|
00000060 d4 da a4 d1 28 b2 35 d6 6d f5 34 a9 7f 1d 21 0b |....(.5.m.4...!.|
00000070 90 57 77 fa 4e ee 61 78 76 0b 24 aa fd 84 be e1 |.Ww.N.axv.$.....|
00000080 00 19 06 f2 c3 b2 98 f9 89 a8 ed ba 56 17 83 04 |............V...|
00000090 47 06 af 38 fd 03 5a a9 40 f2 08 fd 41 35 62 cd |G..8..Z.@...A5b.|
@lukego
lukego / gist:a88764ea77637c747b6cc4b859f26856
Created December 10, 2023 10:53
KernelAbstractions.jl error with oneAPI / Thinkpad / NixOS
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.3 (2023-08-24)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using KernelAbstractions
@lukego
lukego / bm.jl
Last active November 1, 2023 15:33
Julia benchmark from slack
using Random: rand!
using LoopVectorization: @turbo
function test_fct(vec_, r1, r2)
xx = vec_
rand!(r1)
rand!(r2)
for j in 1:11
@turbo for i in eachindex(xx, r1, r2)
xx[i] = xx[i] < r1[i] ? r2[i] : xx[i]
----------------------------------------------------------------------
-- Static binary assets for constructing HTTP/2 responses.
-- These templates are based on the HTTP/2 specification and reference
-- examples from a wireshark capture.
-- (Note: These can be encoded once and reused between requests.)
----------------------------------------------------------------------
local assets = {}
-- Return the binary representation of an annotated ascii hex dump.
@lukego
lukego / 0README.md
Last active June 15, 2023 19:03
CLIME installation instructions
@lukego
lukego / rte_memcpy.h
Last active May 15, 2023 12:00
rte_memcpy.h
/*-
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
@lukego
lukego / gist:4746bcc8cf5ec9409411e677808e9d0e
Created March 30, 2023 11:41
DEFMODEL line expansion
(defun line
(observations
&key (n-particles 100) (steps 100)
(jitter-scales '(0.01d0 0.35d0 1.0d0)))
"Linear relationship between X and Y with Gaussian noise of constant scale:
y ~ m*x + c + N(0,σ)
Infers parameters M (gradient), C (intercept), and σ (standard deviation.)"
(let ((#:m (init-parameter-vector n-particles -10.0d0 10.0d0))
(#:c (init-parameter-vector n-particles -10.0d0 10.0d0))
(#:σ (init-parameter-vector n-particles 1.1102230246251568d-16 5.0d0)))
{
description = "NuddyCAD";
inputs.nixpkgs.url = "nixpkgs";
inputs.nix-cl.url = "github:lukego/nix-cl/trial";
outputs = { self, nixpkgs, nix-cl }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
sbcl = nix-cl.packages.x86_64-linux.sbcl.withPackages (ps:
with ps; [
# Generic
#!/usr/bin/env -S awk -f
/BUILD FAILED: Error while trying to load definition for system/ { print("load-definition-for-system"); next }
/BUILD FAILED: Filesystem error with pathname/ { print("filesystem-error-with-pathname"); next }
/BUILD FAILED: Implementation not supported./ { print("implementation-not-supported"); next }
/BUILD FAILED: Java exception/ { print("java-exception"); next }
/BUILD FAILED: No specification defined for current paltform/ { print("no-specification"); next }
/BUILD FAILED: Permission denied/ { print("permission-denied"); next }
/BUILD FAILED: Subprocess/ { print("subprocess"); next }
/BUILD FAILED: Unable to determine Python include directory/ { print("python"); next }