ThoughtWorksInc/Compute.scala

Travis CI crashes due to clReleaseEvent

Closed this issue · 0 comments

Atry commented

Tensor.toString may crash on AMD APP SDK. The problem can be reproduced by repeatedly call toString.

After some investigation, I found that it is due to a clReleaseEvent call to a cl_event returned from an asynchronous clEnqueueReadBuffer. Our code base does not use the cl_event after clReleaseEvent, however, it seems that the AMD APP SDK's OpenCL runtime still use the cl_event, thus crashes the entire JVM.

As a workaround, we can delay the clReleaseEvent call to make sure a cl_event living at least some seconds.