Updated docs and renamig kp::Constants
Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
parent
990ccd5f3b
commit
932620091c
14 changed files with 162 additions and 47 deletions
|
|
@ -36,9 +36,9 @@ tensors (optional) The tensors to use to create the descriptor
|
|||
resources @param spirv (optional) The spirv code to use to create the
|
||||
algorithm @param workgroup (optional) The kp::Workgroup to use for the
|
||||
dispatch which defaults to kp::Workgroup(tensor[0].size(), 1, 1) if
|
||||
not set. @param specializationConstants (optional) The kp::Constants
|
||||
not set. @param specializationConstants (optional) The std::vector<float>
|
||||
to use to initialize the specialization constants which cannot be
|
||||
changed once set. @param pushConstants (optional) The kp::Constants to
|
||||
changed once set. @param pushConstants (optional) The std::vector<float> to
|
||||
use when initializing the pipeline, which set the size of the push
|
||||
constants - these can be modified but all new values must have the
|
||||
same vector size as this initial value.)doc";
|
||||
|
|
@ -54,12 +54,12 @@ static const char *__doc_kp_Algorithm_destroy = R"doc()doc";
|
|||
static const char *__doc_kp_Algorithm_getPush =
|
||||
R"doc(Gets the specialization constants of the current algorithm.
|
||||
|
||||
@returns The kp::Constants currently set for push constants)doc";
|
||||
@returns The std::vector<float> currently set for push constants)doc";
|
||||
|
||||
static const char *__doc_kp_Algorithm_getSpecializationConstants =
|
||||
R"doc(Gets the specialization constants of the current algorithm.
|
||||
|
||||
@returns The kp::Constants currently set for specialization constants)doc";
|
||||
@returns The std::vector<float> currently set for specialization constants)doc";
|
||||
|
||||
static const char *__doc_kp_Algorithm_getTensors =
|
||||
R"doc(Gets the current tensors that are used in the algorithm.
|
||||
|
|
@ -127,9 +127,9 @@ parameters to create the underlying resources.
|
|||
@param spirv The spirv code to use to create the algorithm @param
|
||||
workgroup (optional) The kp::Workgroup to use for the dispatch which
|
||||
defaults to kp::Workgroup(tensor[0].size(), 1, 1) if not set. @param
|
||||
specializationConstants (optional) The kp::Constants to use to
|
||||
specializationConstants (optional) The std::vector<float> to use to
|
||||
initialize the specialization constants which cannot be changed once
|
||||
set. @param pushConstants (optional) The kp::Constants to use when
|
||||
set. @param pushConstants (optional) The std::vector<float> to use when
|
||||
initializing the pipeline, which set the size of the push constants -
|
||||
these can be modified but all new values must have the same vector
|
||||
size as this initial value.)doc";
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ PYBIND11_MODULE(kp, m) {
|
|||
|
||||
py::class_<kp::OpAlgoDispatch, std::shared_ptr<kp::OpAlgoDispatch>>(
|
||||
m, "OpAlgoDispatch", py::base<kp::OpBase>(), DOC(kp, OpAlgoDispatch))
|
||||
.def(py::init<const std::shared_ptr<kp::Algorithm>&,const kp::Constants&>(),
|
||||
.def(py::init<const std::shared_ptr<kp::Algorithm>&,const std::vector<float>&>(),
|
||||
DOC(kp, OpAlgoDispatch, OpAlgoDispatch),
|
||||
py::arg("algorithm"), py::arg("push_consts") = kp::Constants())
|
||||
py::arg("algorithm"), py::arg("push_consts") = std::vector<float>())
|
||||
.def(py::init(&opAlgoDispatchPyInit),
|
||||
DOC(kp, OpAlgoDispatch, OpAlgoDispatch),
|
||||
py::arg("algorithm"), py::arg("push_consts"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue