Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Failed to validate user provided mapping. with UserDefinedModelParserStage #67

Open
chensy7 opened this issue Dec 5, 2024 · 0 comments

Comments

@chensy7
Copy link

chensy7 commented Dec 5, 2024

Hi, I'm trying to run Stream on workloads defined in the .yaml format, but I'm getting the following error:

2024-12-04 19:54:07,393 - invalidate +103 - CRITICAL - User-defined mapping is invalid. The following restrictions apply: [{0: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 1: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 2: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 3: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 4: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 5: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 6: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}], 7: [{'core_allocation': ['unknown field'], 'inter_core_tiling': ['unknown field'], 'intra_core_tiling': ['unknown field']}]}]
Traceback (most recent call last):
  File "/afs/ece.cmu.edu/project/km_group/.vol13/siyuanch/stream/main_stream_ga.py", line 50, in <module>
    scme = optimize_allocation_ga(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/project/km_group/.vol13/siyuanch/stream/stream/api.py", line 116, in optimize_allocation_ga
    answers = mainstage.run()
              ^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/project/km_group/.vol13/siyuanch/stream/stream/stages/stage.py", line 62, in run
    for cme, extra_info in self.list_of_callables[0](self.list_of_callables[1:], **self.kwargs).run():
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/project/km_group/.vol13/siyuanch/stream/stream/stages/parsing/accelerator_parser.py", line 29, in run
    for cme, extra_info in sub_stage.run():
                           ^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/project/km_group/.vol13/siyuanch/stream/stream/stages/parsing/user_defined_model_parser.py", line 34, in run
    workload = self.parse_workload_stream(all_mappings)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/project/km_group/.vol13/siyuanch/stream/stream/stages/parsing/user_defined_model_parser.py", line 42, in parse_workload_stream
    mapping_data = self._parse_mapping_data()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/usr/siyuanch/anaconda3/envs/stream/lib/python3.12/site-packages/zigzag/stages/parser/workload_parser.py", line 54, in _parse_mapping_data
    return self.parse_mapping_data(self.mapping_yaml_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/afs/ece.cmu.edu/usr/siyuanch/anaconda3/envs/stream/lib/python3.12/site-packages/zigzag/stages/parser/workload_parser.py", line 64, in parse_mapping_data
    raise ValueError("Failed to validate user provided mapping.")
ValueError: Failed to validate user provided mapping.

I'm running main_stream_ga.py with

accelerator = "stream/inputs/examples/hardware/tpu_like_quad_core.yaml"
workload_path = "stream/inputs/examples/workload/resnet18.yaml"
mapping_path = "stream/inputs/examples/mapping/tpu_like_quad_core.yaml"

The rest of the file is unchanged. I'm using UserDefinedModelParserStage instead of StreamONNXModelParserStage.

Am I doing something wrong? Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant