CreateKernelFromString

KernelHandle tt::tt_metal::CreateKernelFromString(Program &program, const std::string &kernel_src_code, const std::variant<CoreCoord, CoreRange, CoreRangeSet> &core_spec, const std::variant<DataMovementConfig, ComputeConfig> &config)

Creates a data movement or compute kernel from source code with the given config and adds it to the program.

Return value: Kernel ID (uintptr_t)

Argument Description

program The program to which this kernel will be added to

kernel_src_code Source code for kernel

core_spec Either a single logical core, a range of logical cores or a set of logical core ranges that indicate which cores kernel is placed on

config Config for data movement or compute kernel