This is an archive of the discontinued LLVM Phabricator instance.

Add a create function for mlir::SerializeToCubinPass
ClosedPublic

Authored by ivanradanov on Sep 18 2022, 6:30 PM.

Diff Detail

Event Timeline

ivanradanov created this revision.Sep 18 2022, 6:30 PM
ivanradanov requested review of this revision.Sep 18 2022, 6:30 PM
bondhugula added inline comments.Sep 18 2022, 10:46 PM
mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
129–131

Any reason to default this to old hardware - how about sm_80 instead?

mlir/lib/Dialect/GPU/Transforms/SerializeToCubin.cpp
148–149

No need to duplicate the doc comment here.

herhut accepted this revision.Sep 19 2022, 7:54 AM

Not sure about the defaults but looks good otherwise. Also +1 to @bondhugula comments. Please address those first.

mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
129–131

Why do we need to give these defaults, at all?

This revision is now accepted and ready to land.Sep 19 2022, 7:54 AM
  • Default arg and comment fix
ivanradanov marked 3 inline comments as done.Sep 19 2022, 2:47 PM
ivanradanov added inline comments.
mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
129–131

@bondhugula @herhut I have removed the default arguments here, and left newer defaults ones in the class constructor - should help someone immediately know what should go in there at a glance.

mlir/lib/Dialect/GPU/Transforms/SerializeToCubin.cpp
148–149

Removed.

ivanradanov marked an inline comment as done.Sep 19 2022, 3:21 PM
This revision was automatically updated to reflect the committed changes.

Changing the defaults makes some integration tests fail if a toolchain doesn't support sm_80, e.g. mlir/test/Integration/GPU/CUDA:all-reduce-max.mlir.test

Error: failed with error code the provided PTX was compiled with an unsupported toolchain.[ptxas application ptx input, line 5; fatal : Unsupported .version 7.5; current version is '7.4']

Was it really necessary to also change the defaults?