intel / intel/intel-graphics-compiler

functionControl internal option is documented but only the misspelled functonControl works

Open Beginner friendly
#422 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
718
Forks
191
PR merge metrics
No merged PRs in 30d

Description

`IGCInternalOptions.td:139` on master defines `functonControl`, while the comment on line 138 documents the option as `-ze-intel-functionControl`. The correctly spelled form is defined nowhere, and unknown internal options are accepted without a diagnostic, so it silently does nothing.

ocloc 26.27.39122.11, `-device dg2`. Still present on master at 321f3610.

```c
__attribute__((noinline)) int helper(global int *p, int i) { return p[i] * 3 + i; }
kernel void k(global int *o, global int *p) {
int i = get_global_id(0);
o[i] = helper(p, i) + helper(p, i + 1);
}
```

| `-internal_options` | resulting `fc_dg2.bin` |
|---|---|
| none | 5736 bytes |
| `-cl-intel-functonControl 1` | 5952 bytes |
| `-cl-intel-functionControl 1` | 5736 bytes, byte identical to none |

I have a patch adding the documented spelling as an alias so the existing one keeps working, and can open a PR.

Contributor guide

Open the contributing guide

Research direction

Start at IGCInternalOptions.td:138-139 and inspect how internal option names are declared and consumed. Reproduce the issue with ocloc on dg2 using the supplied kernel, comparing fc_dg2.bin for no option and each spelling. Done means the documented spelling is recognized while the existing spelling remains compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.