Skip to content

新增 aimol.tensorvia 0.3.2 - #796

Merged
Sunrisepeak merged 4 commits into
mcpplibs:mainfrom
Aimol-l:add-tensorvia-0.3.1
Nov 15, 2026
Merged

Sunrisepeak merged 4 commits into
mcpplibs:mainfrom
Aimol-l:add-tensorvia-0.3.1

Conversation

@Aimol-l

@Aimol-l Aimol-l commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

新增 aimol.tensorvia 0.3.2,一个 C++23 模块张量库,用法是 import tensorvia;。默认走 CPU,想用显卡后端加 --accel。

包自己的 mcpp.toml 里写着怎么构建,索引只管下地址,所以这里登记的是版本、下载链接和校验值。

只登记 linux 和 windows:CPU 后端是 AVX2 写的,macOS 的 CI 机器是 arm64 编不过;macOS 那台 CI 跳过这个测试,跳过的地方写了原因。

加了一个测试项目:用默认 CPU 包导入模块、算几个结果、对数值。

0.3.2 修的是 Windows 的 clang 下缺少 -march 参数、AVX2 代码编不过的问题。

描述符语法、lint 和解析本地都过了,构建跑测试交给 CI。

aimol added 2 commits November 15, 2026 13:35
Form A: the release tarball carries the library's own mcpp.toml at its root
(`git archive v0.3.1`, no <repo>-<tag>/ wrap layer), so the pointer is the
literal path, as gcc.libstdcxx does.

linux and windows only: the CPU backend is AVX2 (`<immintrin.h>`) and the
package withdrew its macOS claim in 0.3.1 rather than publish a tarball that
cannot compile on Apple silicon. The CI leg skips the member on macOS for the
same reason.

The test member selects no accelerator, so it exercises the CPU artifact an
unqualified consumer gets: import the module, run CPU ops, read back scalars.
0.3.1 在 Windows 的 clang 腿编译不过:`-march=x86-64-v3` 之前按 os 门控,
Windows 看不到它,AVX2 intrinsics 报 always_inline 失败。0.3.2 改成按
arch + compiler 门控,描述符与 member 跟着升版本、换 sha256。
@Aimol-l Aimol-l changed the title aimol.tensorvia 0.3.1:C++23 模块张量库 新增 aimol.tensorvia 0.3.2 Nov 15, 2026
aimol added 2 commits November 15, 2026 23:33
第一次发的 0.3.2 缺 Windows 修复,索引的 windows-default 腿编不过:
<cpuid.h> 把 __cpuid 定义成函数宏,MSVC <wchar.h> 拉进来的 <intrin.h>
里那句 `void __cpuid(int[4], int);` 正好被宏吃掉。tag 和 tarball 一起重发,
sha256 随之改变,url 和版本号不变。
第一版只修了 <cpuid.h> 的 __cpuid 宏撞车,编译过了但链接炸:
__builtin_cpu_supports 引用 libgcc 的 __cpu_model / __cpu_features2,
而 -fms-runtime-lib=dll -fuse-ld=lld 的线上没有 libgcc。这个问题原来
一直被编译错误挡着,看不见。改成自己问 CPUID,tag 和 tarball 再重发一次,
sha256 从 dbdb24dc… 变成 f5170e41…,url 和版本号不变。
@Sunrisepeak
Sunrisepeak merged commit 164647e into mcpplibs:main Nov 15, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants