Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-thapi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ runs:
make install
- name: Install H2yaml
shell: bash
run: pip install git+https://github.com/TApplencourt/h2yaml@v0.4.2
run: pip install git+https://github.com/TApplencourt/h2yaml@v0.4.3
- name: Set Efficios environment variables
shell: bash
run: |
Expand Down
11 changes: 11 additions & 0 deletions backends/hip/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# HIP Backend

## `hip_missing_apis.h`

`hip_missing_apis.h` is not part of the official header.

Declarations for functions and types exported by `libamdhip64.so` but not declared in any public HIP header:

- `hipGraphDebugDotPrint`: Exports a `hipGraph_t` as a DOT file. The `hipGraphDebugDotFlags` enum (used by the `flag` parameter) is declared in `hip_runtime_api.h`, but the function itself is not.
- Runtime registration functions: `__hipRegisterFatBinary`, `__hipRegisterFunction`, `__hipRegisterVar`, etc.
- `hipGetCmdName`, `activity_domain_t`, `hipRegisterTracerCallback`
3 changes: 0 additions & 3 deletions backends/hip/extract/hip_api.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#define __HIP_PLATFORM_AMD__
#define THAPI_NO_INCLUDE

#include <hip/hip_runtime_api.h>

#include <hip/hiprtc.h>

#include <hip/hip_runtime_load_api.h>

#include <hip/hip_ext.h>

#include "hip_cpp_symbols.h"
Expand Down
10 changes: 9 additions & 1 deletion backends/hip/gen_hip_library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,22 @@ def print_struct(name, struct)
print_struct_with_namespace(:HIP, name, struct, prepends: prepends)
end

typedef_enum_names = $all_types.filter_map { |t| t.type.name if t.type.is_a?(YAMLCAst::Enum) }.to_set
$all_enums.each do |e|
next unless e.name
next if typedef_enum_names.include?(e.name)

print_enum(e.name, e)
end

$all_types.each do |t|
if t.type.is_a? YAMLCAst::Enum
enum = $all_enums.find { |e| t.type.name == e.name }
print_enum(t.name, enum)
elsif $objects.include?(t.name)
print_hip_object(t.name)
elsif t.type.is_a? YAMLCAst::Struct
struct = $all_structs.find { |s| t.type.name == s.name }
struct = t.type.name ? $all_structs.find { |s| t.type.name == s.name } : t.type
next unless struct

print_struct(t.name, struct)
Expand Down
Loading
Loading