Solved by steplee in post #2 
              
              
                I’ve fixed it by creating a CPUContext manually and passing it. Looks like the samples I’ve been drawing from are out of date.