MCPcopy Create free account
hub / github.com/KomputeProject/kompute / vkPropertiesToDict

Function vkPropertiesToDict

python/src/utils.hpp:10–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace kp {
9namespace py {
10static pybind11::dict
11vkPropertiesToDict(const vk::PhysicalDeviceProperties& properties)
12{
13 std::string deviceName = properties.deviceName;
14 pybind11::dict pyDict(
15 "device_name"_a = deviceName,
16 "max_work_group_count"_a =
17 pybind11::make_tuple(properties.limits.maxComputeWorkGroupCount[0],
18 properties.limits.maxComputeWorkGroupCount[1],
19 properties.limits.maxComputeWorkGroupCount[2]),
20 "max_work_group_invocations"_a =
21 properties.limits.maxComputeWorkGroupInvocations,
22 "max_work_group_size"_a =
23 pybind11::make_tuple(properties.limits.maxComputeWorkGroupSize[0],
24 properties.limits.maxComputeWorkGroupSize[1],
25 properties.limits.maxComputeWorkGroupSize[2]),
26 "timestamps_supported"_a =
27 (bool)properties.limits.timestampComputeAndGraphics);
28
29 return pyDict;
30}
31}
32}

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected