MCPcopy Create free account
hub / github.com/ROCm/clr / AllocCaptureSetValidate

Method AllocCaptureSetValidate

rocclr/platform/command.cpp:670–689  ·  view source on GitHub ↗

=================================================================================================

Source from the content-addressed store, hash-verified

668
669// =================================================================================================
670int32_t NDRangeKernelCommand::AllocCaptureSetValidate(void** kernelParams, address kernArgs,
671 size_t kernArgsSize) {
672 const amd::Device& device = queue()->device();
673 // Validate the kernel before submission
674 if (!queue()->device().validateKernel(kernel(), queue()->vdev(), cooperativeGroups())) {
675 return CL_OUT_OF_RESOURCES;
676 }
677
678 parameters_ = kernel().parameters().alloc(*queue()->vdev());
679 if (parameters_ == nullptr) {
680 LogError("Cannot allocate memory for parameters_");
681 return CL_OUT_OF_RESOURCES;
682 }
683
684 if (!kernel().parameters().captureAndSet(kernelParams, kernArgs, kernArgsSize, parameters_)) {
685 LogError("Cannot capture and set the kernel parameters");
686 return CL_OUT_OF_RESOURCES;
687 }
688 return CL_SUCCESS;
689}
690
691int32_t NDRangeKernelCommand::captureAndValidate() {
692 const amd::Device& device = queue()->device();

Callers 1

ihipLaunchKernelCommandFunction · 0.80

Calls 6

deviceMethod · 0.80
parametersMethod · 0.80
captureAndSetMethod · 0.80
validateKernelMethod · 0.45
vdevMethod · 0.45
allocMethod · 0.45

Tested by

no test coverage detected