~/bend-docscommunity

bend-gpu-attention@0.2.0.0 relies on unsafe/foreign

0x76496238d3c67141a5c47e05479a213a

bend-gpu-attention: fused FlashAttention-style attention on Bend arrays: one foreign call for all heads, FP16 tensor cores, no score matrix.

bend-gpu-attention@0.2.0.0 by tjpa

Other versions (2)
Published
2026-11-12
Size
53,605 bytes, 6 files
License
MIT-0 (no LICENSE file; the hub's default)
Declarations
0 laws (0 proved), 47 defs, 3 types

Import

import bend-gpu-attention@0.2.0.0/attention.bend as Attention
import 0x76496238d3c67141a5c47e05479a213a/attention.bend as Attention
import bend-gpu-attention@0.2.0.0/package.bend as Package
import 0x76496238d3c67141a5c47e05479a213a/package.bend as Package
import bend-gpu-attention@0.2.0.0/test/attn_test.bend as Attn_test
import 0x76496238d3c67141a5c47e05479a213a/test/attn_test.bend as Attn_test

Modules

Other files

Dependencies

No imports from other hub packages.

Dependents

No package in this build imports it.

Status on bend 2.0.40

FileStatusChecker saysTime
attention.bendrelies on unsafe/foreign 1 def relies on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 1 def relies on unsafe or foreign code:
defs that depend on foreign effects: Attn.f16
0.5 s
package.bendrelies on unsafe/foreign 37 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 37 defs rely on unsafe or foreign code:
defs that depend on @unsafe: 0x76496238d3c67141a5c47e05479a213a/test/attn_test.fv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.uv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.fill, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wq, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wk, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getq, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getk, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.setp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.setr, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.dot, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.dot_q, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.dot_k, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.scores, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.scores_put, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.expsum, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.expsum_put, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.pv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.pv_p, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.pv_v, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.outs, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.outs_put, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.row_exp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.row_out, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.one, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.all, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.cmp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.cmp_o, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.cmp_r, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.finish, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.checked, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.run_case, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.main
defs that depend on foreign effects: 0x76496238d3c67141a5c47e05479a213a/attention.Attn.f16, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.run_case, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.main
Hint: no law or proof uses these defs. Move them to a file this proof does not import, and the proofs will check: 0x76496238d3c67141a5c47e05479a213a/test/attn_test.fv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.uv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.fill, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wq, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wk, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.wp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getq, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getk, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.getp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.setp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.setr, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.dot, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.dot_q, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.dot_k, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.scores, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.scores_put, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.expsum, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.expsum_put, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.pv, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.pv_p, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.pv_v, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.outs, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.outs_put, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.row_exp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.row_out, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.one, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.all, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.cmp, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.cmp_o, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.cmp_r, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.finish, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.checked, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.run_case, 0x76496238d3c67141a5c47e05479a213a/test/attn_test.main, 0x76496238d3c67141a5c47e05479a213a/attention.Attn.f16
0.7 s
test/attn_test.bendrelies on unsafe/foreign 37 defs rely on unsafe or foreign code
output
SOME PROOFS FAIL
Error: 37 defs rely on unsafe or foreign code:
defs that depend on @unsafe: fv, uv, fill, wq, wk, wv, wp, getq, getk, getv, getp, setp, setr, dot, dot_q, dot_k, scores, scores_put, expsum, expsum_put, pv, pv_p, pv_v, outs, outs_put, row_exp, row_out, one, all, cmp, cmp_o, cmp_r, finish, checked, run_case, main
defs that depend on foreign effects: 0x76496238d3c67141a5c47e05479a213a/attention.Attn.f16, run_case, main
0.5 s