================ @@ -44,6 +128,18 @@ LLVM_ABI StringRef getArchName(uint32_t GPUIPVersion); /// \return the numeric name of \p GPUIPVersion, e.g. "xe_35.11.0". LLVM_ABI std::string getNumericArchName(uint32_t GPUIPVersion); +/// Parse an IGCA target string, such as "igca_20ca". \return an invalid +/// IGCATarget if \p TargetStr is not a known target in +/// IntelGPUTargetParser.def +LLVM_ABI IGCATarget parseIGCATarget(StringRef TargetStr); + +/// \return the \p Target as a string, i.e. "igca_20ca". \return an empty string +/// if \p Target is invalid or not a known target in IntelGPUTargetParser.def. +LLVM_ABI StringRef getIGCATargetName(IGCATarget Target); ---------------- srividya-sundaram wrote:
#229247 adds getIGCAName(GPUKind), which also produces names like "igca_20ca", but from its own macros. With both PRs in, two functions build the same string. I'd keep one: #229247 can return an IGCATarget for a device, and the name can come from getIGCATargetName. Once #229247 lands, we can update this one. https://github.com/llvm/llvm-project/pull/227468 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
