Skip to content

Instantly share code, notes, and snippets.

@isuruf
isuruf / create.py
Created October 21, 2024 13:48
Create mingw toolchain
CONDA_SUBDIR=win-64 conda create -n mingw gcc gxx gfortran binutils clang clangxx flang lld
conda activate mingw
cd $CONDA_PREFIX/Library
echo "--target=x86_64-w64-mingw32" > bin/clang.cfg
echo "--target=x86_64-w64-mingw32" > bin/clang++.cfg
echo "--target=x86_64-w64-mingw32" > bin/flang.cfg
cp -r ../conda-meta share/
rm -f share/conda-meta/history
conda 3rdparty -n mingw > share/conda-meta/licenses.txt
cd ..
@isuruf
isuruf / gist:aaead06e2b1d801a20910bc44a9ffcdf
Last active September 24, 2024 22:12
Use conda-forge lapack with acelerate as blas backend
git clone https://github.com/isuruf/vecLibFort
cd vecLibFort
conda create -n numpy pytest hypothesis numpy "libblas=*=*netlib" --yes
conda activate numpy
clang -O3 -c -o vecLibFort.o vecLibFort.c
clang -shared -o libblas.3.dylib vecLibFort.o -Wl,-reexport_library,$(xcrun -show-sdk-path)/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.tbd
codesign -s - -f libblas.3.dylib
rm $CONDA_PREFIX/lib/libblas.3.dylib
rm $CONDA_PREFIX/lib/libcblas.3.dylib
@isuruf
isuruf / README.md
Last active July 30, 2020 04:36 — forked from bollwyvl/README.md
Using pypy on binder

on

Binder

Thanks to the toil of the folks at conda-forge, you can try out PyPy, a fast alternative Python implementation.

Not everything is available yet, but the bot just keeps on migrating: there's still lots to do, so stay tuned!

(base) [centos@conda-forge-p8-1 pypy3.6-feedstock]$ conda build recipe -m .ci_support/linux_ppc64le_.yaml
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from .ci_support/linux_ppc64le_.yaml
INFO:conda_build.variants:Adding in variants from .ci_support/linux_ppc64le_.yaml
Attempting to finalize metadata for pypy3.6
INFO:conda_build.metadata:Attempting to finalize metadata for pypy3.6
Collecting package metadata (repodata.json): ...working... done
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@isuruf
isuruf / commands.sh
Last active September 18, 2019 07:16
LLVM bug
clang-7 in1.ll -O3 -fvectorize -emit-llvm -S -o out1.ll
clang-7 in2.ll -O3 -fvectorize -emit-llvm -S -o out2.ll
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@isuruf
isuruf / keybase.md
Created August 27, 2019 05:51
keybase.md

Keybase proof

I hereby claim:

  • I am isuruf on github.
  • I am isuruf (https://keybase.io/isuruf) on keybase.
  • I have a public key ASAq_JZi4sthU0Kt30PSX6H5iY_l7Yg_KaAWz9nQU5nJwwo

To claim this, I am signing this object:

set YEAR=2015
set VER=14
mkdir "%PREFIX%\etc\conda\activate.d"
COPY "%RECIPE_DIR%\activate.bat" "%PREFIX%\etc\conda\activate.d\vs%YEAR%_compiler_vars.bat"
echo if "%%VC14_ON_VS2017%%" == "" ( >> "%PREFIX%\etc\conda\activate.d\vs%YEAR%_compiler_vars.bat"
IF "%cross_compiler_target_platform%" == "win-64" (
echo SET "CMAKE_GENERATOR=Visual Studio 15 2017 Win64" -T "v140" >> "%PREFIX%\etc\conda\activate.d\vs%YEAR%_compiler_vars.bat"