AnsweredAssumed Answered

Issue with OpenCL driver's use of temporary files.

Question asked by Ono-Sendai on Nov 12, 2015
Latest reply on Dec 1, 2015 by dipak

Hi,

AMD's OpenCL driver has an issue with its use of temporary files.

The driver creates temporary files, such as

C:\Users\nick\AppData\Local\Temp\OCLD921.tmp.

It looks like one or more of these temporary files is created per kernel compilation.

They don't seem to be cleaned up however.

The general format for the filename seems to be OCLXXXX, where the Xs are hexadecimal characters.

This gives 16^4 = 65536 possible temp file names.

Once that order of kernel executions have been done, most or all of the possible temporary files have been created.

 

When this happens, the driver seems to do a sequential search through the available filenames, looking for a free filename.  This causes an extreme slowdown

of kernel compilation/build.  A kernel that used to take 0.05s now takes ~4s.

 

I have a screenshot from process monitor that pretty much summarises the problem.  You can see that a linear search is done through filenames on the temp filesystem, looking for a free filename.

 

https://dl.dropboxusercontent.com/u/8789055/opencl_name_collisions.PNG

 

 

AMD Catalyst Control Center Version: 2015.0804.21.41908

Catalyst Version: 15.7.1

GPU: HD7770

Outcomes