update cuda errors for 11
deprecated API was removed
This commit is contained in:
20
cuda_error.h
20
cuda_error.h
@@ -83,14 +83,14 @@ inline void __print_cuda_ptr_info(const char *label, void *ptr) {
|
|||||||
WARN("get pointer attr", cu_err);
|
WARN("get pointer attr", cu_err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (attr.memoryType == cudaMemoryTypeDevice) {
|
} else if (attr.type == cudaMemoryTypeDevice) {
|
||||||
if (attr.isManaged) {
|
type_name = "Device";
|
||||||
type_name = "Managed";
|
} else if (attr.type == cudaMemoryTypeManaged) {
|
||||||
} else {
|
type_name = "Managed";
|
||||||
type_name = "Device";
|
} else if (attr.type == cudaMemoryTypeHost) {
|
||||||
}
|
|
||||||
} else if (attr.memoryType == cudaMemoryTypeHost) {
|
|
||||||
type_name = "Host";
|
type_name = "Host";
|
||||||
|
} else if (attr.type == cudaMemoryTypeUnregistered) {
|
||||||
|
type_name = "Unregistered";
|
||||||
}
|
}
|
||||||
printf("CUDA pointer %s (%zx): %s\n", label, ptr, type_name);
|
printf("CUDA pointer %s (%zx): %s\n", label, ptr, type_name);
|
||||||
}
|
}
|
||||||
@@ -111,10 +111,8 @@ inline void __print_cuda_mem_info(const char *label, void *ptr, size_t size) {
|
|||||||
WARN("get pointer attr", cu_err);
|
WARN("get pointer attr", cu_err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (pointer_attr.memoryType == cudaMemoryTypeDevice) {
|
} else if (pointer_attr.type == cudaMemoryTypeManaged) {
|
||||||
if (pointer_attr.isManaged) {
|
is_managed = true;
|
||||||
is_managed = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_managed) {
|
if (!is_managed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user