Skip to content

Add 'deep_copy' to bazel to allow variable reuse - #3750

Merged
phoenix-meadowlark merged 1 commit into
iree-org:mainfrom
phoenix-meadowlark:deep-copy
Nov 6, 2020
Merged

phoenix-meadowlark merged 1 commit into
iree-org:mainfrom
phoenix-meadowlark:deep-copy

Conversation

@phoenix-meadowlark

Copy link
Copy Markdown
Contributor

Previously if one tried to reuse the failing configurations from another
test suite it would behave unexpectedly due to variable mutation.

@phoenix-meadowlark phoenix-meadowlark added integrations Relating to high-level frontend integrations bazel->cmake labels Nov 6, 2020
@google-cla google-cla Bot added the cla: yes label Nov 6, 2020
if not "target_backends" in flags_to_values:
fail("`target_backends` must be a key in `flags_to_values`.")

# Bazel will implictly mutate this variable's state if it is not copied.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh god, what implicit mutation is happening here??

@phoenix-meadowlark phoenix-meadowlark Nov 6, 2020 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We canonicalize failing_configurations when we use it to create the sweet. That does things like wrap bare string in lists which actually not problematic, but it also expands out unspecified values, which can have undesirable effects. e.g.

FAILING_STATIC = [
    {
        "layer": "layer_1",
    }
]

FAILING_DYNAMIC = FAILING_STATIC + [
    {
        "layer": "layer_2",
    }
]

iree_e2e_cartesian_product_test_suite(
  ...
  failing_configurations = FAILING_STATIC,
  flags_to_values = {
      "dynamic_batch": False,
      "layer": ["layer_1", "layer_2"],
  }
  ...
)

print(FAILING_STATIC)
# [
#     {
#         "layer": ["layer_1"],
#         "dynamic_batch": [False]
#     }
# ]

print(FAILING_DYNAMIC)

# [
#     {
#         "layer": ["layer_1"],
#         "dynamic_batch": [False]
#     },
#     {
#        "layer": "layer_2",
#     }
# ]

iree_e2e_cartesian_product_test_suite(
  ...
  failing_configurations = FAILING_DYNAMIC,
  flags_to_values = {
      "dynamic_batch": True,
      "layer": ["layer_1", "layer_2"],
  }
  ...
)

# 'layer_1' is not marked as failing

@phoenix-meadowlark
phoenix-meadowlark merged commit 0601682 into iree-org:main Nov 6, 2020
@ScottTodd ScottTodd mentioned this pull request Nov 9, 2020
copybara-service Bot pushed a commit that referenced this pull request Nov 9, 2020
* 1ba69d9 Deduplicate flow.executable ops during Flow dialect transformation. (#3702)
* 848b893 Seperate tensorflow coverage into multiple pages (#3758)
* be8dd02 Merge pull request #3760 from google/benvanik-aot-windows-prework
* 6d83db8 Adding support for embedding debug symbols (pdb/dwarf/etc) in dylibs.
* 8a1347f Bumping tracy to disable vsync capture and expose the dbghelp lock.
* 4dc7064 Improving error messages in iree-run-module with invalid function names.
* 4d7805b Optimizations to reduce dispatch overhead. All of these will be fixed with the..
* d57efa3 Making IREE_CHECK_OK not double-evaluate. Prior to this it would run the expre..
* 10b400e Canonicalizing win32 paths prior to trying to open files. Useful in cases wher..
* f9c11f2 [spirv] Use addNestedPass<FuncOp>() for passes working on functions (#3745)
* ab4cb7c Add static, dynamic and training tests for all tf.keras.layers (#3753)
* aaf3377 Adopt pipeline-in-a-pass infra (#3741)
* 43b1d76 Create template for Bug Reports (#3755)
* d264a16 Remove unused deps from kws test (#3751)
* 0601682 Add 'deep_copy' to bazel to allow variable reuse (#3750)
* a70b1d1 Merge google -> main (#3749)

COPYBARA_INTEGRATE_REVIEW=#3762 from ScottTodd:main-to-google 1ba69d9
PiperOrigin-RevId: 341484363
ScottTodd added a commit that referenced this pull request Nov 9, 2020
* 1ba69d9 Deduplicate flow.executable ops during Flow dialect transformation. (#3702)
* 848b893 Seperate tensorflow coverage into multiple pages (#3758)
* be8dd02 Merge pull request #3760 from google/benvanik-aot-windows-prework
* 6d83db8 Adding support for embedding debug symbols (pdb/dwarf/etc) in dylibs.
* 8a1347f Bumping tracy to disable vsync capture and expose the dbghelp lock.
* 4dc7064 Improving error messages in iree-run-module with invalid function names.
* 4d7805b Optimizations to reduce dispatch overhead. All of these will be fixed with the..
* d57efa3 Making IREE_CHECK_OK not double-evaluate. Prior to this it would run the expre..
* 10b400e Canonicalizing win32 paths prior to trying to open files. Useful in cases wher..
* f9c11f2 [spirv] Use addNestedPass<FuncOp>() for passes working on functions (#3745)
* ab4cb7c Add static, dynamic and training tests for all tf.keras.layers (#3753)
* aaf3377 Adopt pipeline-in-a-pass infra (#3741)
* 43b1d76 Create template for Bug Reports (#3755)
* d264a16 Remove unused deps from kws test (#3751)
* 0601682 Add 'deep_copy' to bazel to allow variable reuse (#3750)
* a70b1d1 Merge google -> main (#3749)

COPYBARA_INTEGRATE_REVIEW=#3762 from ScottTodd:main-to-google 1ba69d9
PiperOrigin-RevId: 341484363
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrations Relating to high-level frontend integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants