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

Method setWorkgroup

src/Algorithm.cpp:367–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367void
368Algorithm::setWorkgroup(const Workgroup& workgroup, uint32_t minSize)
369{
370
371 KP_LOG_INFO("Kompute OpAlgoCreate setting dispatch size");
372
373 // The dispatch size is set up based on either explicitly provided template
374 // parameters or by default it would take the shape and size of the tensors
375 if (workgroup[0] > 0) {
376 // If at least the x value is provided we use mainly the parameters
377 // provided
378 this->mWorkgroup = { workgroup[0],
379 workgroup[1] > 0 ? workgroup[1] : 1,
380 workgroup[2] > 0 ? workgroup[2] : 1 };
381 } else {
382 this->mWorkgroup = { minSize, 1, 1 };
383 }
384
385 KP_LOG_INFO("Kompute OpAlgoCreate set dispatch size X: {}, Y: {}, Z: {}",
386 this->mWorkgroup[0],
387 this->mWorkgroup[1],
388 this->mWorkgroup[2]);
389}
390
391const Workgroup&
392Algorithm::getWorkgroup()

Callers 1

rebuildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected