Skip to content

Instantly share code, notes, and snippets.

@LevitatingBusinessMan
Last active October 4, 2022 11:29
Show Gist options
  • Save LevitatingBusinessMan/0a214c62471999a1d5afbdb732e773a0 to your computer and use it in GitHub Desktop.
Save LevitatingBusinessMan/0a214c62471999a1d5afbdb732e773a0 to your computer and use it in GitHub Desktop.
diff --git a/init.c b/init.c
index 8b32a1a..fd17692 100644
--- a/init.c
+++ b/init.c
@@ -935,7 +935,7 @@ static int cutorch_isManagedPtr(lua_State *L)
lua_pushboolean(L, 0);
} else {
THCudaCheck(res);
- lua_pushboolean(L, attributes.isManaged);
+ lua_pushboolean(L, attributes.type == cudaMemoryTypeManaged);
}
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment