Skip to content

Commit fcf39b8

Browse files
authored
H2yaml hip (#487)
1 parent 9045916 commit fcf39b8

9 files changed

Lines changed: 168 additions & 435 deletions

File tree

.github/actions/setup-thapi/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ runs:
9595
make install
9696
- name: Install H2yaml
9797
shell: bash
98-
run: pip install git+https://github.com/TApplencourt/h2yaml@v0.4.2
98+
run: pip install git+https://github.com/TApplencourt/h2yaml@v0.4.3
9999
- name: Set Efficios environment variables
100100
shell: bash
101101
run: |

backends/hip/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# HIP Backend
2+
3+
## `hip_missing_apis.h`
4+
5+
`hip_missing_apis.h` is not part of the official header.
6+
7+
Declarations for functions and types exported by `libamdhip64.so` but not declared in any public HIP header:
8+
9+
- `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.
10+
- Runtime registration functions: `__hipRegisterFatBinary`, `__hipRegisterFunction`, `__hipRegisterVar`, etc.
11+
- `hipGetCmdName`, `activity_domain_t`, `hipRegisterTracerCallback`

backends/hip/extract/hip_api.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#define __HIP_PLATFORM_AMD__
2-
#define THAPI_NO_INCLUDE
32

43
#include <hip/hip_runtime_api.h>
54

65
#include <hip/hiprtc.h>
76

8-
#include <hip/hip_runtime_load_api.h>
9-
107
#include <hip/hip_ext.h>
118

129
#include "hip_cpp_symbols.h"

backends/hip/gen_hip_library.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,22 @@ def print_struct(name, struct)
6767
print_struct_with_namespace(:HIP, name, struct, prepends: prepends)
6868
end
6969

70+
typedef_enum_names = $all_types.filter_map { |t| t.type.name if t.type.is_a?(YAMLCAst::Enum) }.to_set
71+
$all_enums.each do |e|
72+
next unless e.name
73+
next if typedef_enum_names.include?(e.name)
74+
75+
print_enum(e.name, e)
76+
end
77+
7078
$all_types.each do |t|
7179
if t.type.is_a? YAMLCAst::Enum
7280
enum = $all_enums.find { |e| t.type.name == e.name }
7381
print_enum(t.name, enum)
7482
elsif $objects.include?(t.name)
7583
print_hip_object(t.name)
7684
elsif t.type.is_a? YAMLCAst::Struct
77-
struct = $all_structs.find { |s| t.type.name == s.name }
85+
struct = t.type.name ? $all_structs.find { |s| t.type.name == s.name } : t.type
7886
next unless struct
7987

8088
print_struct(t.name, struct)

0 commit comments

Comments
 (0)