[ROCM] Core Functionality for AMD (#1983)

* this pr adds a third party backend for triton that works on AMD
* this expose a lot of the work that has been done in our
[fork](https://github.com/ROCmSoftwarePlatform/triton)
* most unit tests on `test_core.py` pass
* it skips some unit tests for various reasons
* we plan to follow up with more prs improving Functionality and
Performance in the future

---------

Co-authored-by: Philippe Tillet <phil@openai.com>
This commit is contained in:
Michael Melesse
2023-10-16 15:06:07 -05:00
parent 833c9b985f
commit 09ba348f87
17 changed files with 264 additions and 377 deletions

View File

@@ -46,7 +46,7 @@ inline std::string getenv(const char *name) {
inline bool getBoolEnv(const std::string &env) {
std::string msg = "Environment variable " + env + " is not recognized";
assert(triton::ENV_VARS.find(env.c_str()) != triton::ENV_VARS.end() &&
assert(::triton::ENV_VARS.find(env.c_str()) != ::triton::ENV_VARS.end() &&
msg.c_str());
const char *s = std::getenv(env.c_str());
std::string str(s ? s : "");