Skip to content

Fix gc-cpu-runner arith dialect parsing failure #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2024
Merged

Conversation

yifeizh2
Copy link
Contributor

@yifeizh2 yifeizh2 commented Jul 19, 2024

Fix gc-cpu-runner parser stage error on bf16 workloads

loc("<stdin>":83:53): error: #"arith"<"fastmath<contract>"> : 'none' attribute created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR opt tool used
could not parse the input IR

@yifeizh2
Copy link
Contributor Author

The above mentioned error is not reproducible on a few environments, so I am not sure whether the fix is a must or not.

@yifeizh2 yifeizh2 requested a review from Menooker July 19, 2024 03:19
@@ -38,6 +39,7 @@ int main(int argc, char **argv) {
llvm::InitializeNativeTargetAsmParser();

mlir::DialectRegistry registry;
mlir::registerAllDialects(registry);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to find out which dialect we really need, instead of all dialects initialization.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only arith is needed. I narrowed down the scope.

@yifeizh2 yifeizh2 requested review from xurui1995 and crazydemo July 22, 2024 02:36
Copy link
Contributor

@xurui1995 xurui1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crazydemo
Copy link

LGTM

@Menooker
Copy link

The above mentioned error is not reproducible on a few environments, so I am not sure whether the fix is a must or not.

CPUs with/without bf16 support may have a difference? I suggest to root-cause this issue a bit more. Anyway, this PR LGTM.

@yifeizh2
Copy link
Contributor Author

yifeizh2 commented Jul 22, 2024

The above mentioned error is not reproducible on a few environments, so I am not sure whether the fix is a must or not.

CPUs with/without bf16 support may have a difference? I suggest to root-cause this issue a bit more. Anyway, this PR LGTM.

I checked this issue with @crazydemo last Friday. It happens on 10219, but not 10220, so it is not that likely to be related to instruction set. I will spend time to root cause this issue, comparing the environment difference between 10219 and 10220 later~

@yifeizh2 yifeizh2 merged commit 6e890f1 into main Jul 22, 2024
4 checks passed
dchigarev pushed a commit to dchigarev/graph-compiler that referenced this pull request Jul 29, 2024
Fix gc-cpu-runner arith dialect parsing failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants