Skip to content

Instantly share code, notes, and snippets.

View 3tty0n's full-sized avatar

YUSUKE IZAWA 3tty0n

View GitHub Profile

Running Quartus + Questa on Apple Silicon

The current methods to run an Intel FPGA workflow on Apple Silicon involve two possibile approaches:

  • Using a WoA Virtual Machine: Performance is terrible (already in amd64 Windows platforms is terrible, adding two virtualization layers on top of it leads to eternal compilation times) + space wasted for all the Microsoft bloatware
  • Using a Docker Container: Performance is better than WoA, but the USB drivers are not working

Running Linux on UTM with Rosetta enabled should tackle these problems

Disclaimer for Baremetal installation

This guide could possibly work also when installing Debian directly on the Mac with Asahi Linux, but it is not recommended for beginners: with the standard installation procedure the Linux Kernel uses a default page size of 16K, and the rosetta binary is not designed to run with this page size. By recompiling the Linux Kernel to use 4K page sizes it should work flawlessly, but expect slower perfomance and/or higher power usage

#!/bin/sh
trap break INT
while true
do
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video10
done
trap - INT
@mcarilli
mcarilli / nsight.sh
Last active April 25, 2026 01:15
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...
@d-satoi
d-satoi / LaTeXonElCapitan.md
Last active January 24, 2022 08:07
OS X El Capitan+Sublime Text 3でヒラギノを埋め込んだPDFを作る

このメモについて

  • OS X El Capitanで新規にLaTeX(MacTeX 2015)をインストールし、
  • Sublime Text 3LaTeXToolsでコンパイルできるようにし、
  • El Capitan仕様のヒラギノフォントをPDFへ埋め込めるようにします。

おおよその手順は他の方々が書かれている記事の通りなのですが、ヒラギノの埋め込みなどに関して少しつまづいたところがあり試行錯誤したので、備忘録としてここに手順をまとめておきます。

documentclass{jsarticle}および情報処理学会のLaTeXスタイルファイル(2015年11月6日版)で動作確認済です。

@smarr
smarr / truffle-material.md
Last active April 2, 2025 18:27
Truffle: Languages and Material
def index(id:String) = Action {
getFirstData(id)
}
private def getFirstData(id:String) = {
Cache.get(id) match {
case Some(id2) => getSecondData(id2)
case None => NotFound
}
}
private def getSecondData(id2:String) = {
\documentclass{jarticle}
\usepackage{scala}
\begin{document}
こんにちわ
\end{document}