fix(gpu): keep unknown targets out of exact filters

Fixes #6599
This commit is contained in:
morluto committed 2026-10-23 18:08:46 +08:00
1 parent 6442329717
commit 0205f870db
2 files changed
+36 -5

No files matched your search

@@ -344,17 +344,19 @@ export const projectGpuCodeObjectsView = (
: view.collection === "targets"
? targetRows
: report.kernels;
const matchesTarget = (row: (typeof rows)[number]): boolean => {
if (targets === undefined) return true;
const target =
"target" in row ? row.target : byId.get(row.object_id)?.target;
return target !== null && target !== undefined && targets.has(target);
};
const matches = rows.filter(
(row) =>
(ids === undefined || ids.has(row.id)) &&
(objectIds === undefined ||
("object_id" in row && objectIds.has(row.object_id))) &&
(names === undefined || ("name" in row && names.has(row.name))) &&
(targets === undefined ||
targets.has(
("target" in row ? row.target : byId.get(row.object_id)?.target) ??
"",
)),
matchesTarget(row),
);
const defaults =
view.collection === "kernels"