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

macOS e2e tests fail due to multi-processing #994

Closed
powderluv opened this issue Jun 29, 2022 · 2 comments
Closed

macOS e2e tests fail due to multi-processing #994

powderluv opened this issue Jun 29, 2022 · 2 comments

Comments

@powderluv
Copy link
Collaborator

build with:

(mlir_venv) (base) anush@denali torch-mlir % cmake -GNinja -Bbuild   -DCMAKE_BUILD_TYPE=Release   -DCMAKE_C_COMPILER=clang   -DCMAKE_CXX_COMPILER=clang++   -DPython3_FIND_VIRTUALENV=ONLY   -DLLVM_ENABLE_PROJECTS=mlir   -DLLVM_EXTERNAL_PROJECTS="torch-mlir;torch-mlir-dialects"   -DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR=`pwd`   -DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR=`pwd`/externals/llvm-external-projects/torch-mlir-dialects   -DMLIR_ENABLE_BINDINGS_PYTHON=ON   -DLLVM_TARGETS_TO_BUILD=host externals/llvm-project/llvm  && cmake --build build --target check-torch-mlir-python

Fails with the following on an intel mac system


********************
********************
Failed Tests (6):
  TORCH_MLIR_PYTHON :: torchscript_e2e_test/basic.py
  TORCH_MLIR_PYTHON :: torchscript_e2e_test/compilation_failure.py
  TORCH_MLIR_PYTHON :: torchscript_e2e_test/error_reports.py
  TORCH_MLIR_PYTHON :: torchscript_e2e_test/non_tensor_values.py
  TORCH_MLIR_PYTHON :: torchscript_e2e_test/runtime_failure.py
  TORCH_MLIR_PYTHON :: torchscript_e2e_test/submodule.py


Testing Time: 2.89s
  Passed: 6
  Failed: 6

@silvasean
Copy link
Contributor

What is the error message?

@powderluv
Copy link
Collaborator Author

powderluv commented Jul 3, 2022

The error is:

                                                                                                                                                                                                                                             
********************                                                                                                                 
FAIL: TORCH_MLIR_PYTHON :: torchscript_e2e_test/error_reports.py (11 of 12)                                                          
******************** TEST 'TORCH_MLIR_PYTHON :: torchscript_e2e_test/error_reports.py' FAILED ********************                   
Script:                                                                                                                              
--                                                                                                                                   
: 'RUN: at line 6';   /Users/anush/github/torch-mlir/mlir_venv/bin/python3.10 /Users/anush/github/torch-mlir/python/test/torchscript_e2e_test/error_reports.py | /Users/anush/github/torch-mlir/build/bin/FileCheck /Users/anush/github/torch-mlir/python/test/torchscript
_e2e_test/error_reports.py                                                                                                                                                                                                                                                
--                                                                                                                                   
Exit Code: 2                                                                                                                         
                                                                                                                                     
Command Output (stderr):                                                                                                             
--                                                                                                                                                                                                                                                                        
Traceback (most recent call last):                                                                                                   
  File "/Users/anush/github/torch-mlir/python/test/torchscript_e2e_test/error_reports.py", line 161, in <module>                                                                                                                                                          
    main()                                                                                                                           
  File "/Users/anush/github/torch-mlir/python/test/torchscript_e2e_test/error_reports.py", line 156, in main                                                                                                                                                              
    results = run_tests(GLOBAL_TEST_REGISTRY, config)                                                                                                                                                                                                                     
  File "/Users/anush/github/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/torchscript/framework.py", line 360, in run_tests
    run_workers_in_parallel(tests_queue, worker)                                                                                     
  File "/Users/anush/github/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/torchscript/framework.py", line 325, in run_workers_in_parallel
    p.start()                                                                                                                                                                                                                                                             
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)                                                                                                  
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/context.py", line 224, in _Popen           
    return _default_context.get_context().Process._Popen(process_obj)                                                                
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/context.py", line 284, in _Popen           
    return Popen(process_obj)                                     
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__ 
    super().__init__(process_obj)                                                                                                    
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__       
    self._launch(process_obj)                                     
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)                      
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)                                                                                                                                                                                                                              
AttributeError: Can't pickle local object 'run_tests.<locals>.worker'                                                                                                                                                                                                     
FileCheck error: '<stdin>' is empty.    
FileCheck command line:  /Users/anush/github/torch-mlir/build/bin/FileCheck /Users/anush/github/torch-mlir/python/test/torchscript_e2e_test/error_reports.py
                                                                                                                                                                                                                                                                          
--                                                                                                                                   

powderluv added a commit to powderluv/torch-mlir that referenced this issue Jul 3, 2022
powderluv added a commit to powderluv/torch-mlir that referenced this issue Jul 5, 2022
powderluv added a commit to powderluv/torch-mlir that referenced this issue Jul 5, 2022
gpetters94 pushed a commit to gpetters94/mlir-npcomp that referenced this issue Jul 12, 2022
gpetters94 pushed a commit to gpetters94/mlir-npcomp that referenced this issue Jul 27, 2022
qedawkins pushed a commit to nod-ai/torch-mlir that referenced this issue Oct 3, 2022
* support for mulit dialect builder

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>

* comment

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>

* format

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>

Co-authored-by: Tung D. Le <tung@jp.ibm.com>
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

2 participants