Repository navigation
CPU vs GPU Pulsed Update Produces Very Different Results #767
Unanswered
Zhaoxian-Wu
asked this question in
Q&A
Replies: 1 comment
|
Your point sounds quite interesting @Zhaoxian-Wu. Let me discuss it with the team and see what other users think. Thanks! 😄 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Observation
When running
tile.update(x, d)on CPU and GPU with identical initial weights and inputs, the resulting weights differ substantially — not just at floating-point precision, but at a level comparable to or exceeding the weight change itself.Measurement
64×64 tile, lr=0.01, all device-to-device variation disabled, averaged over 20 runs.
Metric:
mean|w_cpu - w_gpu| / mean|Δw|The cause is straightforward: CPU and GPU use independent random number generators, producing different pulse sequences from the same input.
Why This Matters
The simulator aims to predict how analog hardware behaves. But this means a researcher could get noticeably different training curves — and potentially different conclusions about a device configuration — depending on whether they run on CPU or GPU. Neither result is "wrong", but they are different realizations of the same stochastic process.
This raises a question about faithfulness vs. performance: the stochastic pulse model faithfully captures the noisy nature of real analog devices, and independent RNG is the natural consequence of parallel GPU execution. On the other hand, if two simulation runs of the same experiment give very different trajectories, it becomes harder to attribute differences to device parameters vs. simulation noise.
I'm just curious to hear how others think about the tradeoff between faithful stochastic simulation and reproducible results.
From the perspective of someone designing or evaluating analog AI hardware:
Reproduction
All reactions