Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HeteroFlow
THAPI
Commits
9050991c
Commit
9050991c
authored
Oct 20, 2020
by
Brice Videau
Browse files
Added zeLoaderInit new API entry.
parent
eb22ac1c
Pipeline
#11662
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ze/tracer_ze_helpers.include.c
View file @
9050991c
...
@@ -340,6 +340,10 @@ static void _dump_properties() {
...
@@ -340,6 +340,10 @@ static void _dump_properties() {
}
}
}
}
#define ZE_LOADER_INIT_PTR zeLoaderInit_ptr
typedef
ze_result_t
(
*
zeLoaderInit_t
)();
static
zeLoaderInit_t
ZE_LOADER_INIT_PTR
=
(
void
*
)
0x0
;
static
void
_load_tracer
(
void
)
{
static
void
_load_tracer
(
void
)
{
char
*
s
=
NULL
;
char
*
s
=
NULL
;
void
*
handle
=
NULL
;
void
*
handle
=
NULL
;
...
@@ -355,6 +359,9 @@ static void _load_tracer(void) {
...
@@ -355,6 +359,9 @@ static void _load_tracer(void) {
}
}
find_ze_symbols
(
handle
);
find_ze_symbols
(
handle
);
ZE_LOADER_INIT_PTR
=
(
zeLoaderInit_t
)(
intptr_t
)
dlsym
(
handle
,
"zeLoaderInit"
);
if
(
!
ZE_LOADER_INIT_PTR
)
fprintf
(
stderr
,
"Missing symbol zeLoaderInit!
\n
"
);
//FIX for intel tracing layer that needs to register its callbacks first...
//FIX for intel tracing layer that needs to register its callbacks first...
ZE_INIT_PTR
(
0
);
ZE_INIT_PTR
(
0
);
...
@@ -383,3 +390,7 @@ static inline void _init_tracer(void) {
...
@@ -383,3 +390,7 @@ static inline void _init_tracer(void) {
_initialized
=
1
;
_initialized
=
1
;
}
}
ze_result_t
zeLoaderInit
()
{
_init_tracer
();
return
ZE_LOADER_INIT_PTR
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment