def test_black_scholes(self):
output = example_test.run_example(
'finance/black_scholes.py', '--n-options', '10')
six.assertRegex(
self, output.decode('utf-8'),
r'initializing...\n' +
r'start computation\n' +
r' CPU \(NumPy, Naive implementation\):\t[0-9\.]+ sec\n' +
r' GPU \(CuPy, Naive implementation\):\t[0-9\.]+ sec\n' +
r' GPU \(CuPy, Elementwise kernel\):\t[0-9\.]+ sec')
评论列表
文章目录