pycuda
pycuda copied to clipboard
Hash collision.
In pycuda/pycuda/compiler.py, I see that the cache file name is created based on the md5 of the preprocesed output of the code. As far as I know, hash collisions can happen with md5, and I don't see any code that deals with hash collision in pycuda/pycuda/compiler.py. Am I misunderstanding something or is it assumed that hash collisions never happen with pycuda?
Doesn't look like there's a check for that. (There is one in PyOpenCL.) The right thing would probably be to port this over to use https://github.com/inducer/pytools/blob/master/pytools/persistent_dict.py -- I'd be happy to take a patch.