5 ms·
Other comments explain how that's challenging/impossible in the general case because GPU don't have as good preemption as CPUs and because of the halting proble
by kangz 5y ago
Other comments explain how that's challenging/impossible in the general case because GPU don't have as good preemption as CPUs and because of the halting problem. However for the VRChat use case you could imagine disallowing unbounded loops so you can estimate the number of instructions and put a reasonable cap on them. This would take care of the DOS and the WebGPU runtime would take care of the rest of the security (OOB, uninitialized data, etc)