Add HIPRTC, glorious ersatz for NVRTC (#1097)

* Add ersatz for NVRTC.

* Fix extraneous paren and use correct namespace.

* Use lowerCamelCase (yuck, yuck) consistently.

* Link against FS when building hiprtc lib.

* Correctly mark Manipulators. Fix dual compile.

* Add unit tests. Extend HIT to accept linker options.

* Make sure the HIPRTC library is installed.

* Better logging. Try to auto-detect the target.

* Stop specifying the target explicitly.

* Add missing flavour of `hipModuleLaunchKernel`.

* Program was already destroyed.

* Don't use `--genco`. Fix mangled name trimming.

* Fix HIPRTC breakage due to upstream noise.

* [dtests] Replace RUN -> TEST in hiprtc tests

Change-Id: Ie499e92dfe4e5c94634b1c2b76cf52d241bcfea3

* [hit] Set HIP_PATH to HIP_ROOT_DIR for all tests

Change-Id: Ib0ad1f99bc71c03e363e055dd508a7a4a210680a
This commit is contained in:
Alex Voicu
2019-05-16 15:58:54 +03:00
committed by Maneesh Gupta
parent 3178ae2f92
commit a538eb705a
13 changed files with 1250 additions and 26 deletions
+11 -2
View File
@@ -66,10 +66,17 @@ class Kernel_descriptor {
std::uint64_t kernel_object_{};
amd_kernel_code_t const* kernel_header_{nullptr};
std::string name_{};
std::vector<std::pair<std::size_t, std::size_t>> kernarg_layout_{};
public:
Kernel_descriptor() = default;
Kernel_descriptor(std::uint64_t kernel_object, const std::string& name)
: kernel_object_{kernel_object}, name_{name}
Kernel_descriptor(
std::uint64_t kernel_object,
const std::string& name,
std::vector<std::pair<std::size_t, std::size_t>> kernarg_layout = {})
:
kernel_object_{kernel_object},
name_{name},
kernarg_layout_{std::move(kernarg_layout)}
{
bool supported{false};
std::uint16_t min_v{UINT16_MAX};
@@ -548,6 +555,7 @@ public:
return functions[agent].second;
}
static
std::size_t parse_args(
const std::string& metadata,
std::size_t f,
@@ -576,6 +584,7 @@ public:
} while (true);
}
static
void read_kernarg_metadata(
ELFIO::elfio& reader,
std::unordered_map<