improve reproducibility of WebGPU CI puppeteer test (#9496)

* try to make CI test fail with slow JS import

* prevent race between model import and reference

* revert artificial delay in JS module import
This commit is contained in:
hooved
2025-03-18 09:27:38 -04:00
committed by GitHub
parent cde4fd3be3
commit 5500887eed

View File

@@ -18,10 +18,6 @@ canvas { display: none; }
</style>
<title>tinygrad has WebGPU</title>
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/tinygrad/tinygrad/master/docs/logo.png">
<script type="module">
import model from "../../net.js";
window.model = model;
</script>
</head>
<body>
<h1>WebGPU <a href="https://github.com/geohot/tinygrad">tinygrad</a> EfficientNet!</h1>
@@ -102,6 +98,7 @@ canvas { display: none; }
resultText.innerHTML = "loading..."
labels = await getLabels();
const device = await getDevice();
const model = (await import("../../net.js")).default;
net = await timer(() => model.load(device, '../../net.safetensors'), "(compilation)");
resultText.innerHTML = "ready"
} catch (e) {