inducer / arraycontext

Choose your favorite numpy-workalike!
6 stars 11 forks source link

PytatoPyOpenCLArrayContext: don't trust the arg limit reported by the GPU #198

Closed matthiasdiener closed 2 years ago

matthiasdiener commented 2 years ago

Apparently, CUDA doesn't like it when argument sizes get close to the reported limit.

Avoids PTX/JIT errors of the type: CUDA_ERROR_INVALID_IMAGE: device kernel image is invalid CUDA_ERROR_FILE_NOT_FOUND: file not found

Partially addresses https://github.com/illinois-ceesd/mirgecom/issues/679

inducer commented 2 years ago

Interesting. That's a weird error message for "too many arguments".

inducer commented 2 years ago

LMK when you think this is ready.

matthiasdiener commented 2 years ago

I have tested this and it seems to return us to the previous state described in https://github.com/illinois-ceesd/mirgecom/issues/679. This was a regression from my gist which set a fixed limit of 1024 on all devices. @MTCam also experimented with this PR. This is ready for review.

inducer commented 2 years ago

LGTM, thanks!