CUDA program based on unified memory architecture crashes when ran.

Hello, I have been trying hard to run my CUDA projects in my laptop since I’m going out for a while.

My projects use unified memory architecture extensively and I am unable to run them on my outdated laptop GPU.
Compiling with nvcc works fine but when the program(.exe) is ran, it simply crashes.I contacted nvidia live assistance and they recommenced me 8.0 GA1 but it doesn’t work either. From wikipedia 820M has compute capability 2.1 and unified memory architecture is supported is CC 2.0+ devices so I am hoping software mismatch is the only issue. Also the sample code I use to test is given below.

Laptop GPU: Geforce 820M 2GB
Tried Cuda toolkit and driver combinations: 10.1 + 389.12, 8.0 GA1 + 369.30

Sample program:

#include"cuda_runtime.h"
#include

int main(){
int*x;
cudaMallocManaged((void**)&x,sizeof(int));
*x=5;
std::cout<<*x<<std::endl;
cudaFree(x);
}

Unified memory (managed memory) requires compute capability 3.0 or higher.

Just use proper CUDA error checking on that call to cudaMallocManaged and you will get an instructive error code.