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
94cf1bf3
Commit
94cf1bf3
authored
Jul 25, 2023
by
Khalique Ahmed
Browse files
Merge branch 'develop' of
https://github.com/ROCmSoftwarePlatform/AMDMIGraphX
into nhwc_workaround
parents
c0547e9a
49280e51
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
tools/generate.sh
tools/generate.sh
+3
-2
tools/te.py
tools/te.py
+2
-2
No files found.
tools/generate.sh
View file @
94cf1bf3
...
...
@@ -22,6 +22,7 @@
# THE SOFTWARE.
#####################################################################################
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
CLANG_FORMAT
=
/opt/rocm/llvm/bin/clang-format
SRC_DIR
=
$DIR
/../src
PYTHON
=
python3
if
type
-p
python3.6
>
/dev/null
;
then
...
...
@@ -30,10 +31,10 @@ fi
if
type
-p
python3.8
>
/dev/null
;
then
PYTHON
=
python3.8
fi
ls
-1
$DIR
/include/ | xargs
-n
1
-P
$(
nproc
)
-I
{}
-t
bash
-c
"
$PYTHON
$DIR
/te.py
$DIR
/include/{} |
clang-format-10
-style=file >
$SRC_DIR
/include/migraphx/{}"
ls
-1
$DIR
/include/ | xargs
-n
1
-P
$(
nproc
)
-I
{}
-t
bash
-c
"
$PYTHON
$DIR
/te.py
$DIR
/include/{} |
$CLANG_FORMAT
-style=file >
$SRC_DIR
/include/migraphx/{}"
function
api
{
$PYTHON
$DIR
/api.py
$SRC_DIR
/api/migraphx.py
$1
|
clang-format-10
-style
=
file
>
$2
$PYTHON
$DIR
/api.py
$SRC_DIR
/api/migraphx.py
$1
|
$CLANG_FORMAT
-style
=
file
>
$2
}
api
$DIR
/api/migraphx.h
$SRC_DIR
/api/include/migraphx/migraphx.h
...
...
tools/te.py
View file @
94cf1bf3
...
...
@@ -70,7 +70,7 @@ struct ${struct_name}
{
using std::swap;
auto * derived = this->any_cast<PrivateDetailTypeErasedT>();
if(derived and private_detail_te_handle_mem_var.u
nique()
)
if(derived and private_detail_te_handle_mem_var.u
se_count() == 1
)
{
*derived = std::forward<PrivateDetailTypeErasedT>(value);
}
...
...
@@ -181,7 +181,7 @@ private:
private_detail_te_handle_base_type & private_detail_te_get_handle ()
{
assert(private_detail_te_handle_mem_var != nullptr);
if (
not
private_detail_te_handle_mem_var.u
nique()
)
if (private_detail_te_handle_mem_var.u
se_count() > 1
)
private_detail_te_handle_mem_var = private_detail_te_handle_mem_var->clone();
return *private_detail_te_handle_mem_var;
}
...
...
Prev
1
2
3
4
Next
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