update memory output to display in megabytes

This commit is contained in:
Osman Faruk Bayram 2024-12-10 20:50:35 +03:00
parent b5fc9ca745
commit 5c8217b682

View file

@ -6,8 +6,8 @@ int main(){
size_t mf, ma;
cudaMemGetInfo(&mf, &ma);
std::cout << "Free memory (gb): " << mf/1024/1024/1024 << std::endl;
std::cout << "Total memory (gb): " << ma/1024/1024/1024 << std::endl;
std::cout << "Free memory (mb): " << mf/1024/1024 << std::endl;
std::cout << "Total memory (mb): " << ma/1024/1024 << std::endl;
return 0;
}