Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VK_EXT_pageable_device_local_memory support #5246

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7db5444
Add get_gpu_instance() function and Organized the instance class codes.
whyb Apr 17, 2023
e48623d
Move class __ncnn_vulkan_instance_holder declaration from gpu.h to g…
whyb Apr 17, 2023
1042565
Delete empty line changes
whyb Apr 17, 2023
a479422
Reimplement the sleep() and get_current_time() functions using modern…
whyb Apr 28, 2023
6eb3bb7
Fixed build error for __riscv not support c++ 11 thread
whyb Apr 28, 2023
ed932ba
Add NCNN_SIMPLESTL Macro
whyb May 5, 2023
00b9f28
Fix simple stl's compiler build error
whyb May 12, 2023
67ef283
Fix linux-gcc-cpp03-nostdio-nostring-simplestl build error
whyb May 12, 2023
d1e079c
Use u_int64_t type parameters in linux-gcc-cpp03-nostdio-nostring-sim…
whyb May 15, 2023
2ad85f0
change uint64_t&u_int64_t to unsigned long long int
whyb May 15, 2023
cec75bc
Remove include stdint.h and change function sleep() default paramete…
whyb May 16, 2023
85c15a0
apply code-format changes
whyb May 16, 2023
be921fd
Update benchmark.cpp
nihui May 16, 2023
b25ac10
Merge branch 'Tencent:master' into master
whyb May 30, 2023
98af54c
Merge branch 'Tencent:master' into master
whyb May 31, 2023
27ba97b
Merge branch 'Tencent:master' into master
whyb Jun 14, 2023
3110969
Merge branch 'Tencent:master' into master
whyb Jun 26, 2023
a1f84f8
Merge branch 'Tencent:master' into master
whyb Jun 26, 2023
76941c6
Merge branch 'Tencent:master' into master
whyb Aug 7, 2023
6cee97e
Merge branch 'Tencent:master' into master
whyb Oct 10, 2023
56d61d8
Merge branch 'Tencent:master' into master
whyb Oct 12, 2023
9ff751a
Merge branch 'Tencent:master' into master
whyb Oct 27, 2023
aa40554
Merge branch 'Tencent:master' into master
whyb Nov 9, 2023
fb19b98
Merge branch 'Tencent:master' into master
whyb Dec 18, 2023
e56cc3a
Merge branch 'Tencent:master' into master
whyb Dec 25, 2023
091c609
Add VK_EXT_pageable_device_local_memory support
whyb Dec 25, 2023
70c6f49
Merge branch 'master' into VK_EXT_pageable_device_local_memory
nihui Apr 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ class GpuInfoPrivate
int support_VK_EXT_descriptor_indexing;
int support_VK_EXT_memory_budget;
int support_VK_EXT_memory_priority;
int support_VK_EXT_pageable_device_local_memory;
int support_VK_EXT_queue_family_foreign;
int support_VK_AMD_device_coherent_memory;
#if __ANDROID_API__ >= 26
Expand Down Expand Up @@ -794,6 +795,11 @@ int GpuInfo::support_VK_EXT_memory_priority() const
return d->support_VK_EXT_memory_priority;
}

int GpuInfo::support_VK_EXT_pageable_device_local_memory() const
{
return d->support_VK_EXT_pageable_device_local_memory;
}

int GpuInfo::support_VK_EXT_queue_family_foreign() const
{
return d->support_VK_EXT_queue_family_foreign;
Expand Down Expand Up @@ -1695,6 +1701,7 @@ int create_gpu_instance(const char* driver_path)
gpu_info.support_VK_EXT_descriptor_indexing = 0;
gpu_info.support_VK_EXT_memory_budget = 0;
gpu_info.support_VK_EXT_memory_priority = 0;
gpu_info.support_VK_EXT_pageable_device_local_memory = 0;
gpu_info.support_VK_EXT_queue_family_foreign = 0;
gpu_info.support_VK_AMD_device_coherent_memory = 0;
#if __ANDROID_API__ >= 26
Expand Down Expand Up @@ -1756,6 +1763,8 @@ int create_gpu_instance(const char* driver_path)
gpu_info.support_VK_EXT_memory_budget = exp.specVersion;
else if (strcmp(exp.extensionName, "VK_EXT_memory_priority") == 0)
gpu_info.support_VK_EXT_memory_priority = exp.specVersion;
else if (strcmp(exp.extensionName, "VK_EXT_pageable_device_local_memory") == 0)
gpu_info.support_VK_EXT_pageable_device_local_memory = exp.specVersion;
else if (strcmp(exp.extensionName, "VK_EXT_queue_family_foreign") == 0)
gpu_info.support_VK_EXT_queue_family_foreign = exp.specVersion;
else if (strcmp(exp.extensionName, "VK_AMD_device_coherent_memory") == 0)
Expand Down Expand Up @@ -2485,6 +2494,8 @@ VulkanDevice::VulkanDevice(int device_index)
enabledExtensions.push_back("VK_EXT_memory_budget");
if (info.support_VK_EXT_memory_priority())
enabledExtensions.push_back("VK_EXT_memory_priority");
if (info.support_VK_EXT_pageable_device_local_memory())
enabledExtensions.push_back("VK_EXT_pageable_device_local_memory");
if (info.support_VK_EXT_queue_family_foreign())
enabledExtensions.push_back("VK_EXT_queue_family_foreign");
if (info.support_VK_AMD_device_coherent_memory())
Expand Down
1 change: 1 addition & 0 deletions src/gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class NCNN_EXPORT GpuInfo
int support_VK_EXT_descriptor_indexing() const;
int support_VK_EXT_memory_budget() const;
int support_VK_EXT_memory_priority() const;
int support_VK_EXT_pageable_device_local_memory() const;
int support_VK_EXT_queue_family_foreign() const;
int support_VK_AMD_device_coherent_memory() const;
#if __ANDROID_API__ >= 26
Expand Down
Loading