错误信息显示我用的max()函数有问题,但是很奇怪,就是前几帧都是好的,不知道那一帧突然就报错了。
错误信息如下:
[Taichi] version 1.4.1, llvm 15.0.1, commit e67c674e, win, python 3.7.8
[Taichi] Starting on arch=cuda
Traceback (most recent call last):
[E 03/08/23 21:54:58.481 10860] [taichi/rhi/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void *,void *,unsigned __int64>::operator ()@88] CUDA Error CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountered while calling memcpy_host_to_device (cuMemcpyHtoD_v2)
File “C:/Users/yanzh/Documents/GitHub/ttttest.py”, line 467, in
max_T = max(temperature.to_numpy())
File “C:\Users\yanzh\AppData\Local\Programs\Python\Python37\lib\site-packages\taichi\lang\util.py”, line 310, in wrapped
return func(*args, **kwargs)
File “C:\Users\yanzh\AppData\Local\Programs\Python\Python37\lib\site-packages\taichi\lang\field.py”, line 302, in to_numpy
tensor_to_ext_arr(self, arr)
File “C:\Users\yanzh\AppData\Local\Programs\Python\Python37\lib\site-packages\taichi\lang\kernel_impl.py”, line 974, in wrapped
return primal(*args, **kwargs)
File “C:\Users\yanzh\AppData\Local\Programs\Python\Python37\lib\site-packages\taichi\lang\kernel_impl.py”, line 901, in call
return self.runtime.compiled_functionskey
File “C:\Users\yanzh\AppData\Local\Programs\Python\Python37\lib\site-packages\taichi\lang\kernel_impl.py”, line 826, in func__
raise e from None
File “C:\Users\yanzh\AppData\Local\Programs\Python\Python37\lib\site-packages\taichi\lang\kernel_impl.py”, line 823, in func__
t_kernel(launch_ctx)
RuntimeError: [taichi/rhi/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void *,void *,unsigned __int64>::operator ()@88] CUDA Error CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountered while calling memcpy_host_to_device (cuMemcpyHtoD_v2)
[E 03/08/23 21:54:58.595 10860] [taichi/rhi/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void *>::operator ()@88] CUDA Error CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountered while calling stream_synchronize (cuStreamSynchronize)
进程已结束,退出代码 -1073740791 (0xC0000409)