bartz.mcmcloop.CheckPlatformCallback

class bartz.mcmcloop.CheckPlatformCallback(platform)[source]

Check the given platform matches the actual platform at runtime.

platform: Literal['cpu', 'gpu']

The expected platform.

__call__(*, i_total, **_)[source]

Check the platform on the first iteration, raise on mismatch.

Return type:

None