a.sh
:
ip netns add myns
ip link add vethhost type veth peer name vethguest
ip addr add 10.255.255.2/24 dev vethhost
ip link set vethhost up
ip link set vethguest netns myns
基本的に ggml-org/whisper.cpp#220 に書いてある通り。 whisper.cppをOpenBLASを使うようにビルドして、実行時にNVBLASを使う。
Arch Linuxでしか試していない。
https://github.com/ggerganov/whisper.cpp/tree/nvblas
場合によってはmasterブランチでも可、masterブランチでもnvblasをつかうを参照
npm i wrangler -g でアップデートした時に次のログが見えた
The latest release of wrangler is "2.0.15".
Other releases are:
* pages: 0.0.0-96e612b
* beta: 0.0.0-ea7ee45
* wasm: 0.0.0-70a118b
* d1: 0.0.0-d35c69f
https://developers.cloudflare.com/r2/platform/pricing/
up to 10,000,000 read operations + $0.36 per 1,000,000 operations
$3.60 free
up to 1,000,000 write operations + $4.50 per 1,000,000 operations
//! Implements a texture atlas (https://en.wikipedia.org/wiki/Texture_atlas). | |
//! | |
//! The implementation is based on "A Thousand Ways to Pack the Bin - A | |
//! Practical Approach to Two-Dimensional Rectangle Bin Packing" by Jukka | |
//! Jylänki. This specific implementation is based heavily on | |
//! Nicolas P. Rougier's freetype-gl project as well as Jukka's C++ | |
//! implementation: https://github.com/juj/RectangleBinPack | |
//! | |
//! Limitations that are easy to fix, but I didn't need them: | |
//! |
// For Zig 0.12 | |
const std = @import("std"); | |
const net = std.net; | |
const ArenaAllocator = std.heap.ArenaAllocator; | |
pub fn main() anyerror!void { | |
var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | |
const allocator = gpa.allocator(); |
TL;DR. You first create a network namesmace (netns
), and a veth
device
(you also create a peer). Then you assign one end to another netns.
You can talk to another netns via the veth.
TODO: How to use a different device instead of veth for communication across netns?
tsconfig.json
の設定についてのメモ書きです。
target は 変換後のコードのECMAScriptバージョンを指定する
たとえば、Node.js 14はES2020をサポートしている。そのため、Node.js 14向けのコード(サーバなど)ならtarget: "ES2020"
を指定することで、余計なTranspileが省かれててコードサイズや実行時間が最適化される。
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
const std = @import("std"); | |
const system = std.os.system; | |
pub const Scheduler = struct { | |
pub const InitConfig = struct { | |
max_threads: ?u16 = null, | |
}; | |
pub fn init(self: *Scheduler, config: InitConfig) !void { |