Merge main into laya-arch-plugin

This commit is contained in:
Brandon Bertelsen committed 2026-10-29 13:45:18 -04:00
commit ec243c2a7d
189 files changed
+11212 -7060

No files matched your search

+11 -3
View File
@@ -716,9 +716,10 @@ int main(int argc, char** argv) {
"recipe is checked against");
return 1;
}
/* An imported quantisation is recorded as the descriptor of the plugin serving it; the engine
* selects by exact match, and each weight states its own encoding. */
if (imported) {
/* An imported quantisation, or block fp8 served by a family that claims no descriptor for it,
* is recorded as the descriptor of the plugin serving it; the engine selects by exact match,
* and each weight states its own encoding. */
if (!plugins.arch_plugin.empty() && plugins.arch_quant != meta.quant) {
meta.quant = plugins.arch_quant;
meta.finish();
}
@@ -1304,11 +1305,18 @@ int main(int argc, char** argv) {
/* An imported weight is re-laid row by row (ckpt_plane_rows); its bytes are not
* the plane's. */
if (!L.src.imported && (L.src.concat_dim == 0 || src.size() == 1)) {
/* Pieces that share one scale tensor (shards under `X.weight_scale`) have
* that one plane, written once. */
const bool shared = k > 0 && std::all_of(src.begin(), src.end(),
[&](const SrcTensor* s) {
return s == src[0];
});
int64_t off = 0;
for (const SrcTensor* s : src) {
if (w.write_plane(idx, k, off, s->data, s->bytes) != RAD_OK)
return RAD_E_IO;
off += s->bytes;
if (shared) break;
}
if (off != pb) {
RAD_ERR("'%s': its sources hold %lld bytes of plane '%s' and the "
+3 -3
View File
@@ -358,9 +358,9 @@ int write_report(const std::string& path, const std::vector<Row>& rows,
std::string s;
s += "# radiance kernel libraries\n\n";
/* The header may claim only what this pass measured. The counts are the same ones the
* Rows nothing ran section prints from this data below; the sentence claiming every
* kernel ran is true only when no declared row was left unreached. */
/* The header claims only what this pass measured: its counts are the ones the *Rows nothing
* ran* section prints below, and "every kernel ran" only when no declared row went
* unreached. */
size_t declared_rows = 0, reached_rows = 0;
for (const LibRow& l : libs) { declared_rows += l.rows.size(); reached_rows += l.ran.size(); }
const bool all_ran = reached_rows == declared_rows;