intel / intel/mlir-extensions

Add function decoration FuncParamAttr support in SPIRV dialect.

Open
#645 1 comment 0 reactions 0 assignees View on GitHub
Triton
Dominant language
MLIR
Stars
156
Forks
45
Avg merge
4h 14m
Merged PRs (30d)
22

Description

FuncParamAttr is not added to SPIR-V dialect yet which is required to link some functions in the Intel Math Libraries.

The import signature is:
```
OpName %__devicelib_imf_float2bfloat16 "__devicelib_imf_float2bfloat16"
OpDecorate %__devicelib_imf_float2bfloat16 LinkageAttributes "__devicelib_imf_float2bfloat16" Export
OpDecorate %__devicelib_imf_float2bfloat16 FuncParamAttr Zext
```

The import function declaration in SPIRV dialect is:
```
 spirv.func @__devicelib_imf_float2bfloat16(f32) -> i16 "Inline" attributes {FuncParamAttr = "Zext", libname = "libdevice", libpath = "", linkage_attributes = ["__devicelib_imf_float2bfloat16", "Import"]}
```

The error log when to serialize the SPIRV dialect:
error: unhandled decoration FuncParamAttr

Contributor guide

Open the contributing guide

Research direction

Start in the SPIR-V dialect serialization path that reports "unhandled decoration FuncParamAttr" and compare it with the shown OpDecorate input and spirv.func declaration. Done means the FuncParamAttr Zext decoration can be imported and serialized without that error, including the Intel Math Libraries example.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.