Clahe.cu:398: error: (-217:Gpu API call) invalid configuration argument in function 'transform'

I would speculate that one of these values is zero or not an exact multiple of something else.