fix akg ascend kernel bug

This commit is contained in:
Yang Jiao 2023-03-03 16:04:28 +08:00
parent fe36a9fa85
commit 4c2ba4a59f
3 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,7 @@ KernelPackPtr AkgAscendKernelBuilder::AkgInsertCache(const std::string &kernel_n
void AkgAscendKernelBuilder::AkgSetKernelMod(const KernelPackPtr &kernel_pack,
const AkgKernelJsonGenerator &json_generator, const AnfNodePtr &anf_node) {
auto kernel_mod_ptr = std::make_shared<AkgKernelMod>(kernel_pack);
auto kernel_mod_ptr = std::make_shared<AkgKernelMod>(kernel_pack, anf_node);
auto kernel_json_info = kernel_pack->kernel_json_info();
kernel_mod_ptr->SetInputSizeList(json_generator.input_size_list());
kernel_mod_ptr->SetOutputSizeList(json_generator.output_size_list());

View File

@ -37,7 +37,8 @@ constexpr size_t ARGS_REMAP_LEN = 2;
/**
* @brief infotable contain func_stub\blockdim\kernel file buffer
*/
AkgKernelMod::AkgKernelMod(const KernelPackPtr &kernel_pack) : kernel_pack_(kernel_pack) {
AkgKernelMod::AkgKernelMod(const KernelPackPtr &kernel_pack, const AnfNodePtr &anf_node_ptr)
: AscendKernelMod(anf_node_ptr), kernel_pack_(kernel_pack) {
if (kernel_pack != nullptr) {
auto kernel_json_info = kernel_pack->kernel_json_info();
kernel_name_ = kernel_json_info.kernel_name;

View File

@ -26,7 +26,7 @@ namespace mindspore {
namespace kernel {
class AkgKernelMod : public AscendKernelMod {
public:
explicit AkgKernelMod(const KernelPackPtr &kernel_pack);
explicit AkgKernelMod(const KernelPackPtr &kernel_pack, const AnfNodePtr &anf_node_ptr);
~AkgKernelMod() final {}
bool Launch(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs, void *stream_ptr) override;