If you read the pasted code you would see the TVM context with .gpu(0) is commented out and it is tvm.metal(0)