[Parser] Added dims-checking for OpenCL and CUDA