I keep seeing discussions that equate zig's level of memory safety with c (or occasionally with rust!). Neither is particularly accurate. This is an attempt at a more detailed breakdown. This article is limited to memory safety. See Assorted thoughts on zig and rust for a more general comparison. I'm concerned mostly with security. In practice, it doesn't seem that any level of testing is sufficie
LLM training in simple, pure C/CUDA. There is no need for 245MB of PyTorch or 107MB of cPython. For example, training GPT-2 (CPU, fp32) is ~1,000 lines of clean code in a single file. It compiles and runs instantly, and exactly matches the PyTorch reference implementation. I chose GPT-2 as the first working example because it is the grand-daddy of LLMs, the first time the modern stack was put toge
AIの本体と言える大規模言語モデル(LLM)のトレーニングはほとんどの場合PyTorchやPythonを使用して行われていますが、そうしたトレーニングを純粋なC言語のみで実装したツール「llm.c」が登場しました。まだ最適化が行われておらず従来の手法に速度面では敗北していますが、GPT-2のトレーニングを行う実装を約1000行のクリーンなコードで行えています。 GitHub - karpathy/llm.c: LLM training in simple, raw C/CUDA https://github.com/karpathy/llm.c 作者のアンドレイ・カルパシー氏はOpenAIの創設グループの一員で、テスラのAIディレクターだった事もある人物です。 llm.cを使用することで、245MBの容量を持つPyTorchや107MBの容量を持つcPythonを使用せずに大規模言語モデル
LLJVM provides a set of tools and libraries for running comparatively low level languages (such as C) on the JVM. The C to JVM bytecode compilation provided by LLJVM involves several steps. Source code is first compiled to LLVM intermediate representation (IR) by a frontend such as llvm-gcc or clang. LLVM IR is then translated to Jasmin assembly code, linked against other Java classes, and then as
The SIMDe header-only library provides fast, portable implementations of SIMD intrinsics on hardware which doesn't natively support them, such as calling SSE functions on ARM. There is no performance penalty if the hardware supports the native implementation (e.g., SSE/AVX runs at full speed on x86, NEON on ARM, etc.). This makes porting code to other architectures much easier in a few key ways: F
はじめに 一般に、コンパイラによる最適化は局所的であればあるほど効きやすい。例えば同じ関数内ならできる最適化が、グローバル変数がからむとできなくなったり、ファイルをまたぐとできなくなったりする。しかし、最近はリンク時最適化(Link Time Optimization, LTO)と呼ばれる、異なるオブジェクトファイル間にまたがる最適化ができるようになってきた。 ここではいくつかの例で、リンク時最適化として何ができるか紹介してみたいと思う。使うコンパイラは以下の通り。 g++ (Homebrew GCC 7.3.0_1) 7.3.0 clang++ Apple LLVM version 9.1.0 (clang-902.0.39.2) リンク時最適化の例 簡単なサンプルを示そう。 こんなコードを考える。 #include <cstdio> int func() { return 1; } i
Wuffs' goal is to produce software libraries that are as safe as Go or Rust, roughly speaking, but as fast as C, and that can be used anywhere C libraries are used. This includes very large C/C++ projects, such as popular web browsers and operating systems (using that term to include desktop and mobile user interfaces, not just the kernel). Wuffs the Library is available as transpiled C code. Othe
C3 is a programming language that builds on the syntax and semantics of the C language, with the goal of evolving it while still retaining familiarity for C programmers. It's an evolution, not a revolution: the C-like for programmers who like C. Precompiled binaries for the following operating systems are available: Windows x64 download, install instructions. Debian x64 download, install instructi
Implements the WebAssembly Core Specification 1.0 Implements several extensions: Threads and atomics Bulk memory operations Conditional data segment initialization Sign-extension operators Non-trapping float-to-int conversions Passes 99.9% of the WebAssembly core semantics test suite Written in C89 and generates C89 Support for many operating systems (e.g. Mac OS X, Mac OS 9, Haiku, Rhapsody, OPEN
14 March 2023: Cheerp 3.0 released and relicensed to Apache 2.0 licence! Release notes here. What is Cheerp? Cheerp is an enterprise-grade C/C++ compiler for the web that can compile C/C++ into WebAssembly and JavaScript. It is open source, liberally licensed (LLVM licence) and is actively developed by Leaning Technologies.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く