mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-06-07 08:15:04 +00:00
- Workaround for hipRTC content wrapper
- Move descriptor for gemm_softmax_gemm to different branch
This commit is contained in:
@@ -1,36 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "ck/host/headers.hpp"
|
||||
#include "ck/host/stringutils.hpp"
|
||||
#include <rtc/compile_kernel.hpp>
|
||||
#include <rtc/hip.hpp>
|
||||
#include <test.hpp>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
#include <random>
|
||||
#include <unordered_set>
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
const char* const ck_content_wrapper = R"__ck__(
|
||||
${content}
|
||||
)__ck__";
|
||||
|
||||
template <class P>
|
||||
inline std::string content_wrapper(P p)
|
||||
{
|
||||
return ck::host::InterpolateString(ck_content_wrapper,
|
||||
{{"content", std::string{p.data(), p.size()}}});
|
||||
}
|
||||
|
||||
inline std::vector<rtc::src_file> create_headers_for_test()
|
||||
{
|
||||
auto ck_headers = ck::host::GetHeaders();
|
||||
std::vector<rtc::src_file> result;
|
||||
std::transform(ck_headers.begin(), ck_headers.end(), std::back_inserter(result), [](auto& p) {
|
||||
return rtc::src_file{p.first, content_wrapper(p.second)};
|
||||
std::string content;
|
||||
content.reserve(p.second.size() + 1);
|
||||
content.push_back(' '); // We need a whitespace before the content for hipRTC to work
|
||||
content.append(p.second.data(), p.second.size());
|
||||
return rtc::src_file{p.first, std::move(content)};
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ struct hiprtc_program
|
||||
}
|
||||
else
|
||||
{
|
||||
headers.push_back(std::string(src.content.begin(), src.content.end()));
|
||||
headers.push_back(std::move(src.content));
|
||||
include_names.push_back(std::move(src.path));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user