tensorflow / runtime

A performant and modular runtime for TensorFlow
Apache License 2.0
756 stars 123 forks source link

add hiprtc APIs #102

Closed weihanmines closed 2 years ago

weihanmines commented 2 years ago

Thanks for your contribution! Unfortunately, tensorflow/runtime is currently not accepting contributions. Please see the Contribution Guidelines for more information.

This PR only contains the changes needed for the hip just-in-time compilation (hiprtc). The hiprtc headers and implementation are put at the end of hip APIs (see generate.sh) because hiprtc implementation is rolled up in libamdhip64.so which is the same as hip APIs. New PR will be created once hiprtc is separated from hip.

A command line option is added to generate.sh. Bazel requires the option.

@chsigg @hanbinyoon

weihanmines commented 2 years ago

It seems OK to add this, but I think we came to the conclusion that we don't really need this and would instead just use HSACO in the tests? Is this a problem because HSACO is architecture specific, and you want to be able to run the same test across multiple architectures?

I haven't do experiments using HSACO. Let me do some experiments. I got hiprtc working so far. It is the reason why I did not change the ModuleLoadData expression in driver_wrapper.cc and push out the module and launch mlir files.

weihanmines commented 2 years ago

Hi Christian @chsigg, I have removed the duplication from the headers. Let me know if there is anything else I could do to help the merge.