-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into grid_sample
- Loading branch information
Showing
132 changed files
with
2,721 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
resources: | ||
repositories: | ||
- repository: pipelines_repo | ||
type: github | ||
endpoint: ROCm | ||
name: ROCm/ROCm | ||
|
||
variables: | ||
- group: common | ||
- template: /.azuredevops/variables-global.yml@pipelines_repo | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- develop | ||
paths: | ||
exclude: | ||
- .githooks | ||
- .github | ||
- docs | ||
- '.*.y*ml' | ||
- '*.md' | ||
- Jenkinsfile | ||
- LICENSE | ||
|
||
pr: | ||
autoCancel: true | ||
branches: | ||
include: | ||
- develop | ||
paths: | ||
exclude: | ||
- .github | ||
- docs | ||
- '.*.y*ml' | ||
- '*.md' | ||
- Jenkinsfile | ||
- LICENSE | ||
drafts: false | ||
|
||
jobs: | ||
- template: ${{ variables.CI_COMPONENT_PATH }}/AMDMIGraphX.yml@pipelines_repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,7 @@ jobs: | |
fetch-depth: '0' | ||
|
||
- name: Merge Fast Forward Only | ||
uses: IgorMirosavljevicHTEC/[email protected] | ||
with: | ||
branchtomerge: develop | ||
branch: master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git checkout master | ||
git merge origin/develop --ff-only | ||
git push origin HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
rocm-docs-core==1.1.2 | ||
rocm-docs-core==1.2.0 | ||
sphinx-collapse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ pybind/pybind11@3e9dfa2866941655c56877882565e7577de6fc7b --build | |
msgpack/[email protected] -DMSGPACK_BUILD_TESTS=Off | ||
sqlite3@3.43.2 -DCMAKE_POSITION_INDEPENDENT_CODE=On | ||
ROCm/composable_kernel@57cdd70b7cb14e5e3b60cd9a5f96ba8dc343763e -DCK_BUILD_JIT_LIB=On -DCMAKE_POSITION_INDEPENDENT_CODE=On | ||
ROCm/rocMLIR@e50d72fc6ab9a7a792d92a1ba7db6db45e4c508c -DBUILD_FAT_LIBROCKCOMPILER=On | ||
ROCm/rocMLIR@3612396bca1139abf25e2ed0085fe481d275af89 -DBUILD_FAT_LIBROCKCOMPILER=On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
156d52163dd487ca0a1afaa87a12a3e172a45200 | ||
33a68d221f28bd8d412f2e9188e50bac8a255b71 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
*/ | ||
|
||
#ifndef MIGRAPHX_GUARD_TEST_TF_TF_CONV_UTILS_HPP | ||
#define MIGRAPHX_GUARD_TEST_TF_TF_CONV_UTILS_HPP | ||
|
||
inline migraphx::program create_conv() | ||
{ | ||
migraphx::program p; | ||
|
||
auto* mm = p.get_main_module(); | ||
|
||
auto l0 = mm->add_parameter("0", migraphx::shape{migraphx::shape::float_type, {1, 3, 16, 16}}); | ||
std::vector<float> weight_data(3 * 3 * 3 * 32); | ||
std::fill(weight_data.begin(), weight_data.end(), 1.0f); | ||
auto l1 = | ||
mm->add_literal(migraphx::shape{migraphx::shape::float_type, {3, 3, 3, 32}}, weight_data); | ||
|
||
migraphx::op::convolution op; | ||
op.padding = {1, 1, 1, 1}; | ||
op.stride = {1, 1}; | ||
op.dilation = {1, 1}; | ||
auto l2 = | ||
mm->add_instruction(migraphx::make_op("transpose", {{"permutation", {3, 2, 0, 1}}}), l1); | ||
mm->add_instruction(op, l0, l2); | ||
return p; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
#ifndef MIGRAPHX_GUARD_TEST_TF_TF_TEST_HPP | ||
#define MIGRAPHX_GUARD_TEST_TF_TF_TEST_HPP | ||
|
||
#include <iostream> | ||
#include <vector> | ||
#include <unordered_map> | ||
#include <pb_files.hpp> | ||
#include <migraphx/common.hpp> | ||
#include <migraphx/literal.hpp> | ||
#include <migraphx/pass_manager.hpp> | ||
#include <migraphx/simplify_reshapes.hpp> | ||
#include <migraphx/dead_code_elimination.hpp> | ||
#include <migraphx/eliminate_identity.hpp> | ||
#include <migraphx/program.hpp> | ||
#include <migraphx/instruction.hpp> | ||
#include <migraphx/tf.hpp> | ||
#include <migraphx/make_op.hpp> | ||
#include <migraphx/op/convolution.hpp> | ||
#include <migraphx/op/reduce_mean.hpp> | ||
#include <migraphx/op/pooling.hpp> | ||
|
||
#include <migraphx/serialize.hpp> | ||
|
||
#include "test.hpp" | ||
|
||
inline migraphx::program read_pb_file(const std::string& name, const migraphx::tf_options& options) | ||
{ | ||
static auto pb_files{::pb_files()}; | ||
if(pb_files.find(name) == pb_files.end()) | ||
{ | ||
std::cerr << "Can not find TensorFlow Protobuf file by name: " << name | ||
<< " , aborting the program\n" | ||
<< std::endl; | ||
std::abort(); | ||
} | ||
return migraphx::parse_tf_buffer(std::string{pb_files.at(name)}, options); | ||
} | ||
|
||
inline migraphx::program | ||
parse_tf(const std::string& name, | ||
bool is_nhwc, | ||
const std::unordered_map<std::string, std::vector<std::size_t>>& dim_params = {}, | ||
const std::vector<std::string>& output_node_names = {}) | ||
{ | ||
|
||
return read_pb_file(name, migraphx::tf_options{is_nhwc, 1, dim_params, output_node_names}); | ||
} | ||
|
||
inline migraphx::program optimize_tf(const std::string& name, bool is_nhwc) | ||
{ | ||
auto prog = read_pb_file(name, migraphx::tf_options{is_nhwc, 1}); | ||
auto* mm = prog.get_main_module(); | ||
if(is_nhwc) | ||
migraphx::run_passes(*mm, | ||
{migraphx::simplify_reshapes{}, | ||
migraphx::dead_code_elimination{}, | ||
migraphx::eliminate_identity{}}); | ||
|
||
// remove the last return instruction | ||
|
||
if(mm->size() > 0) | ||
{ | ||
auto last_ins = std::prev(mm->end()); | ||
if(last_ins->name() == "@return") | ||
{ | ||
mm->remove_instruction(last_ins); | ||
} | ||
} | ||
return prog; | ||
} | ||
|
||
#endif |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
1Placeholder* | ||
dtype0* | ||
shape: | ||
add1Add01* | ||
T0"� | ||
add1AddV201* | ||
T0"� |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.