Skip to content

Instantly share code, notes, and snippets.

View leshikus's full-sized avatar
💭
happy

Alexei Fedotov leshikus

💭
happy
View GitHub Profile
@leshikus
leshikus / munhen.py
Created April 30, 2024 08:42
Solve munhen = ayti * chat
#!/usr/bin/python3
for m in range(1, 10):
su = set(range(0, 10)) - { m }
for u in su:
sn = su - { u }
for n in sn:
sh = sn - { n }
for h in sh:
se = sh - { h }
@leshikus
leshikus / test-parallel.sh
Created April 17, 2024 09:44
Test how many parallel processes run
cmake --build build --target check-imex & code=$?; sleep 2; ps -ef >ps.txt; fg
rm -rf /home/jovyan/.triton/cache && ( cd intel-xpu-backend-for-triton/python && python3 -m pytest -n 1 --verbose --device xpu test/regression/test_functional_regressions.py 2>&1 ) | tee test.log
@leshikus
leshikus / check-rev.sh
Created March 13, 2024 18:46
Debug CI problem
#!/bin/sh
set -vx
set -eu
test -z ${1+x} && exit 1
ver=$1
create_branch() {
cd ..
@leshikus
leshikus / copy_oneapi.sh
Created February 29, 2024 09:28
Get all libs from OneAPI
find /opt/intel/oneapi/ -name '*.so*' -exec cp -n {} ~/.conda/envs/triton/lib \;
@leshikus
leshikus / triton.yaml
Created February 15, 2024 21:45
conda env for triton
name: triton
channels:
- conda-forge
dependencies:
- gxx_linux-64 11.*.*
- gcc_linux-64 11.*.*
- pip 23.*
- zlib
- cmake 3.22.*
@leshikus
leshikus / conda-compile-triton.sh
Last active April 12, 2024 21:02
Compile triton with conda
set -euvx
name=${1:-triton}
rm -rf intel-xpu-backend-for-triton/ llvm packages/ ~/.triton/cache intel-extension-for-pytorch pytorch
git clone https://github.com/intel/intel-xpu-backend-for-triton -b lesh/3/add-conda-basekit
set +uvx
. ~/.conda/etc/profile.d/conda.sh
#conda deactivate
@leshikus
leshikus / timesheet.ahk
Last active February 29, 2024 10:26
Fill Workday timesheets (Chrome, F11 for fullscreen, windows settings: 1980x1080, 175% scaling)
#Requires AutoHotkey v2.0
waitForPageLoad(x, y, color, attempts)
{
Loop attempts
{
sleep(200)
Loaded := PixelGetColor(x, y)
;MsgBox("Wait for " . color . " Get " . Loaded)
@leshikus
leshikus / setup.sh
Last active February 23, 2024 12:44
Configure my terminal session
# specific settings go here
export HTTPS_PROXY="$https_proxy"
export EDITOR=vim
test -L sh.sh || ln -s sc.sh sh.sh
test -d /localdisk2/afedotov && export HOME=/localdisk2/afedotov
cd
export PS1="\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\] `pwd -P`\[\033[0m\]\n$ "
@leshikus
leshikus / sshd_config
Last active June 19, 2023 14:34
MAAS Centos image sshd config
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the