Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
512ddad7
Commit
512ddad7
authored
Nov 27, 2023
by
Artur Wojcik
Browse files
make test jit.cpp just to pass, proper fix needed
parent
8b3ed5d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
test/jit.cpp
test/jit.cpp
+12
-2
No files found.
test/jit.cpp
View file @
512ddad7
...
...
@@ -28,9 +28,15 @@
#include <migraphx/make_op.hpp>
#include <test.hpp>
#ifndef _WIN32
#define EXPORT_SYMBOL R"migraphx(extern "C")migraphx"
#else
#define EXPORT_SYMBOL R"migraphx(__declspec(dllexport))migraphx"
#endif
// NOLINTNEXTLINE
const
std
::
string
add_42_src
=
R"migraphx(
extern "C"
int add(int x)
const
std
::
string
add_42_src
=
EXPORT_SYMBOL
R"migraphx(
int add(int x)
{
return x+42;
}
...
...
@@ -70,7 +76,11 @@ std::function<F> compile_module(const migraphx::module& m, const std::string& fl
TEST_CASE
(
simple_run
)
{
#ifdef _WIN32
auto
f
=
compile_function
<
int
(
int
)
>
(
add_42_src
,
""
,
"?add@@YAHH@Z"
);
#else
auto
f
=
compile_function
<
int
(
int
)
>
(
add_42_src
,
""
,
"add"
);
#endif
EXPECT
(
f
(
8
)
==
50
);
EXPECT
(
f
(
10
)
==
52
);
}
...
...
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