Query device for threads to calc block size