Implement hiprtc for codegen tests

This commit is contained in:
Dino Musić
2024-09-18 11:23:20 +00:00
parent 1658c0dc11
commit 08255e1b45
8 changed files with 440 additions and 146 deletions

View File

@@ -4,24 +4,29 @@
#include <rtc/kernel.hpp>
#include <ck/filesystem.hpp>
#include <string>
#include <functional>
namespace rtc {
struct src_file
{
CK::fs::path path;
std::string_view content;
std::string content;
};
struct compile_options
{
std::string flags = "";
std::string kernel_name = "main";
std::vector<src_file> additional_src_files = {};
std::string params = "";
};
kernel compile_kernel(const std::vector<src_file>& src,
compile_options options = compile_options{});
kernel compile_kernel(const std::string& content, compile_options options = compile_options{});
} // namespace rtc
#endif

View File

@@ -4,6 +4,7 @@
#include <hip/hip_runtime_api.h>
#include <memory>
#include <string>
#include <stdexcept>
namespace rtc {

View File

@@ -0,0 +1,3 @@
#include <ck/utility/env.hpp>
CK_DECLARE_ENV_VAR_BOOL(CK_CODEGEN_TESTS_ENABLE_HIPRTC)