mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-16 10:59:55 +00:00
Build codegen as standalone (#1556)
* Build codegen as standalone
* Add exception for device tests
* Use local filesystem header
* add a codegen test CI stage and daily build
---------
Co-authored-by: illsilin <Illia.Silin@amd.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
[ROCm/composable_kernel commit: 10158b0ffd]
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "rtc/hip.hpp"
|
||||
#include <rtc/hip.hpp>
|
||||
#include <rtc/compile_kernel.hpp>
|
||||
#include <rtc/tmp_dir.hpp>
|
||||
#include <stdexcept>
|
||||
@@ -70,9 +70,9 @@ kernel compile_kernel(const std::vector<src_file>& srcs, compile_options options
|
||||
|
||||
for(const auto& src : srcs)
|
||||
{
|
||||
CK::fs::path full_path = td.path / src.path;
|
||||
CK::fs::path parent_path = full_path.parent_path();
|
||||
CK::fs::create_directories(parent_path);
|
||||
fs::path full_path = td.path / src.path;
|
||||
fs::path parent_path = full_path.parent_path();
|
||||
fs::create_directories(parent_path);
|
||||
write_string(full_path.string(), src.content);
|
||||
if(src.path.extension().string() == ".cpp")
|
||||
{
|
||||
@@ -86,7 +86,7 @@ kernel compile_kernel(const std::vector<src_file>& srcs, compile_options options
|
||||
td.execute(compiler() + options.flags);
|
||||
|
||||
auto out_path = td.path / out;
|
||||
if(not CK::fs::exists(out_path))
|
||||
if(not fs::exists(out_path))
|
||||
throw std::runtime_error("Output file missing: " + out);
|
||||
|
||||
auto obj = read_buffer(out_path.string());
|
||||
|
||||
@@ -31,10 +31,10 @@ std::string unique_string(const std::string& prefix)
|
||||
}
|
||||
|
||||
tmp_dir::tmp_dir(const std::string& prefix)
|
||||
: path(CK::fs::temp_directory_path() /
|
||||
: path(fs::temp_directory_path() /
|
||||
unique_string(prefix.empty() ? "ck-rtc" : "ck-rtc-" + prefix))
|
||||
{
|
||||
CK::fs::create_directories(this->path);
|
||||
fs::create_directories(this->path);
|
||||
}
|
||||
|
||||
void tmp_dir::execute(const std::string& cmd) const
|
||||
@@ -43,6 +43,6 @@ void tmp_dir::execute(const std::string& cmd) const
|
||||
std::system(s.c_str());
|
||||
}
|
||||
|
||||
tmp_dir::~tmp_dir() { CK::fs::remove_all(this->path); }
|
||||
tmp_dir::~tmp_dir() { fs::remove_all(this->path); }
|
||||
|
||||
} // namespace rtc
|
||||
|
||||
Reference in New Issue
Block a user