timer.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:chainer-deepmark 作者: delta2323 项目源码 文件源码
def __init__(self, blocking_method='non_block'):
        if not cuda.available:
            raise RuntimeError('CUDA must be available to use GPUTimer.')

        if not (blocking_method == 'non_block' or
                blocking_method == 'block_first_time' or
                blocking_method == 'block_every_time'):
            raise ValueError(
                'Invalid blocking method:{}'.format(blocking_method))
        self.blocking_method = blocking_method
        self.reset()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号