帮助开发者为 unitBench 中新的 openzl 编解码节点编写基准测试场景。
该技能材料显示其为纯提示/文档型场景创建说明,不要求密钥,也未声明任何远程端点或本地执行能力,整体风险较低。主要需留意的是来源虽为开源 GitHub 仓库,但星标与维护信息有限,供应链信心一般。
材料明确标注无需密钥或环境变量,未见要求提供 API token、账号凭证或其他敏感认证信息,因此凭证泄露与滥用风险低。
未声明任何远程端点或联网服务;内容主要是本地基准场景文件结构与编写说明,未见将用户数据发送到外部主机的描述。
系统检查项已标明为 prompt-only,当前材料本身是说明文档而非可执行工具接口;虽提到 `dd if=/dev/urandom` 作为测试数据示例,但这是文档内容,不构成该技能自动获得代码执行权限的证据。
材料仅描述应修改的源码路径和测试数据位置,未声明可自动读取、写入或遍历本地文件/数据库/系统资源;因此未见实际数据访问授权范围扩大。
来源为 GitHub 开源仓库,代码可审计,这显著降低风险;但许可证未声明、社区采用度为 0 star、维护状态未知,且 README 截断,供应链可信度仍需人工复核。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "unitbench-openzl-scenarios" 技能: 1. 下载 https://raw.githubusercontent.com/facebook/openzl/dev/.claude/skills/unitbench-scenarios/SKILL.md 2. 保存为 ~/.claude/skills/unitbench-scenarios/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为 unitBench 的新 openzl bitsplit 编解码节点编写一个内核级 encode 基准测试场景,包含测试名称、输入数据模式、参数配置、预热与迭代设置、吞吐量与延迟指标,并保持与现有 scenario 风格一致。
一份可直接用于 unitBench 的内核级编码基准场景草案,包含关键配置与指标定义。
请为 openzl 的 delta + entropy 组合节点设计 unitBench 图级 compress/decompress 基准测试场景,覆盖压缩链路、解压链路、输入样本类型、正确性校验方式,以及压缩率和性能指标。
一份图级压缩与解压基准场景说明,明确测试流程、校验方法和输出指标。
我新增了一个 openzl transpose codec 节点,请根据 unitBench 现有规范生成对应的 benchmark scenarios,分别给出 encode/decode 的内核级测试,以及可选的 graph-level compress/decompress 测试建议。
一组符合现有规范的基准测试场景建议,覆盖内核级与图级测试需求。
Create benchmark scenarios for openzl codec nodes. Two benchmark types exist: kernel (test encode/decode kernel functions directly) and graph (test a node within a full compress/decompress pipeline).
Before creating scenarios, ask the user:
Does this node have a standalone kernel function? (e.g., ZL_bitSplitEncode, ZL_bitSplitDecode)
Should the node be tested in a graph?
What data types/widths does the node operate on?
| What | Where |
|---|---|
| Kernel benchmarks | benchmark/unitBench/scenarios/codecs/<name>.c and .h |
| Graph benchmarks | benchmark/unitBench/scenarios/<name>_graph.c and .h |
| Scenario registration | benchmark/unitBench/benchList.h |
| BUCK file | benchmark/unitBench/BUCK |
| Test data | /tmp/ (use dd if=/dev/urandom) |
All paths relative to the openzl dev root.
Test encode/decode kernel functions directly. Requires a standalone kernel API.
.h)Add declarations to existing scenarios/codecs/<codec>.h or create a new one:
// Decode
size_t <codec>Decode_<type>_prep(void* src, size_t srcSize, const BenchPayload* bp);
size_t <codec>Decode_<type>_outSize(const void* src, size_t srcSize);
size_t <codec>Decode_<type>_wrapper(const void* src, size_t srcSize, void* dst, size_t dstCapacity, void* customPayload);
// Encode
size_t <codec>Encode_<type>_prep(void* src, size_t srcSize, const BenchPayload* bp);
size_t <codec>Encode_<type>_outSize(const void* src, size_t srcSize);
size_t <codec>Encode_<type>_wrapper(const void* src, size_t srcSize, void* dst, size_t dstCapacity, void* customPayload);
.c)Decode scenario: prep packs split streams contiguously into src, wrapper recomputes pointers and calls the decode kernel, outSize returns (srcSize / sumSrcElt) * dstEltWidth.
Encode scenario: prep fills src with random values, wrapper calls the encode kernel writing streams contiguously into dst, outSize returns (srcSize / srcEltWidth) * sumDstElt.
Reference implementation: See scenarios/codecs/bitSplit.c for the complete pattern with multiple data type examples.
Test a node within a full compress/decompress graph. Required when no standalone kernel exists. Also useful alongside kernel benchmarks to measure graph overhead.
.h)// Copyright (c) Meta Platforms, Inc. and affiliates.
#ifndef GUARD_MACRO_H
#define GUARD_MACRO_H
#include "openzl/shared/portability.h"
#include "openzl/zl_compressor.h"
ZL_BEGIN_C_DECLS
ZL_GraphID <name>_graph(ZL_Compressor* cgraph);
ZL_END_C_DECLS
#endif
.c)Build the graph using ZL_Compressor_registerStaticGraph_fromNode1o. Typical pattern: tokenize input -> apply node -> downstream graph.
#include "openzl/codecs/zl_<codec>.h" // ZL_NODE_<YOUR_NODE>
#include "openzl/zl_compressor.h"
#include "openzl/zl_public_nodes.h" // ZL_NODE_INTERPRET_AS_LE*
ZL_GraphID my_graph(ZL_Compressor* cgraph)
{
if (ZL_isError(ZL_Compressor_setParameter(
cgraph, ZL_CParam_formatVersion, ZL_MAX_FORMAT_VERSION))) {
abort();
}
if (ZL_isError(ZL_Compressor_setParameter(
cgraph, ZL_CParam_compressionLevel, 1))) {
abort();
}
return ZL_Compressor_registerStaticGraph_fromNode1o(
cgraph,
…
帮助开发者为 OpenZL 编解码器制定设计模式、需求约束与评审规范。
为 OpenZL 组件注册表生成与维护设计文档,辅助规范 tests/registry 下的改动
为使用 Relay 的 React 组件提供规范写法、调试思路与代码审查建议。
帮助开发者编写并运行基于 Markdown 的 Relay 端到端测试。
帮助开发者读取、编写并调试 Pysa 的 JSON 污点模型与 .models 输出
帮助开发者在提交代码或生成 diff 时套用正确的提交前缀、审阅人和测试计划。