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
9cd9f1d8
Unverified
Commit
9cd9f1d8
authored
Jul 27, 2023
by
Artur Wojcik
Committed by
GitHub
Jul 26, 2023
Browse files
rename function 'near' to 'within_abs' (#1995)
* rename function 'near' to 'make_near' * try disabling vega10 machine
parent
8e18544f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Jenkinsfile
Jenkinsfile
+1
-1
test/include/test.hpp
test/include/test.hpp
+1
-1
test/jit.cpp
test/jit.cpp
+6
-6
No files found.
Jenkinsfile
View file @
9cd9f1d8
...
@@ -90,7 +90,7 @@ def rocmnodename(name) {
...
@@ -90,7 +90,7 @@ def rocmnodename(name) {
}
else
if
(
name
==
"mi100+"
)
{
}
else
if
(
name
==
"mi100+"
)
{
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a) && !vm"
;
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a) && !vm"
;
}
else
if
(
name
==
"cdna"
)
{
}
else
if
(
name
==
"cdna"
)
{
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a || vega) && !vm"
;
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a || vega
20
) && !vm"
;
}
else
if
(
name
==
"nogpu"
)
{
}
else
if
(
name
==
"nogpu"
)
{
node_name
=
"${rocmtest_name} && nogpu"
;
node_name
=
"${rocmtest_name} && nogpu"
;
}
}
...
...
test/include/test.hpp
View file @
9cd9f1d8
...
@@ -384,7 +384,7 @@ bool throws(F f, const std::string& msg = "")
...
@@ -384,7 +384,7 @@ bool throws(F f, const std::string& msg = "")
}
}
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
auto
near
(
T
px
,
U
py
,
double
ptol
=
1e-6
f
)
auto
within_abs
(
T
px
,
U
py
,
double
ptol
=
1e-6
f
)
{
{
return
make_function
(
"near"
,
[](
auto
x
,
auto
y
,
auto
tol
)
{
return
std
::
abs
(
x
-
y
)
<
tol
;
})(
return
make_function
(
"near"
,
[](
auto
x
,
auto
y
,
auto
tol
)
{
return
std
::
abs
(
x
-
y
)
<
tol
;
})(
px
,
py
,
ptol
);
px
,
py
,
ptol
);
...
...
test/jit.cpp
View file @
9cd9f1d8
...
@@ -82,9 +82,9 @@ TEST_CASE(generate_module)
...
@@ -82,9 +82,9 @@ TEST_CASE(generate_module)
auto
f
=
compile_module
<
float
(
float
,
float
)
>
(
m
);
auto
f
=
compile_module
<
float
(
float
,
float
)
>
(
m
);
EXPECT
(
test
::
near
(
f
(
2
,
2
),
2
));
EXPECT
(
test
::
within_abs
(
f
(
2
,
2
),
2
));
EXPECT
(
test
::
near
(
f
(
10
,
6
),
4
));
EXPECT
(
test
::
within_abs
(
f
(
10
,
6
),
4
));
EXPECT
(
test
::
near
(
f
(
1
,
2
),
std
::
sqrt
(
3
)));
EXPECT
(
test
::
within_abs
(
f
(
1
,
2
),
std
::
sqrt
(
3
)));
}
}
TEST_CASE
(
generate_module_with_literals
)
TEST_CASE
(
generate_module_with_literals
)
...
@@ -99,9 +99,9 @@ TEST_CASE(generate_module_with_literals)
...
@@ -99,9 +99,9 @@ TEST_CASE(generate_module_with_literals)
auto
f
=
compile_module
<
float
(
float
,
float
)
>
(
m
);
auto
f
=
compile_module
<
float
(
float
,
float
)
>
(
m
);
EXPECT
(
test
::
near
(
f
(
1
,
2
),
2
));
EXPECT
(
test
::
within_abs
(
f
(
1
,
2
),
2
));
EXPECT
(
test
::
near
(
f
(
9
,
6
),
4
));
EXPECT
(
test
::
within_abs
(
f
(
9
,
6
),
4
));
EXPECT
(
test
::
near
(
f
(
0
,
2
),
std
::
sqrt
(
3
)));
EXPECT
(
test
::
within_abs
(
f
(
0
,
2
),
std
::
sqrt
(
3
)));
}
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
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