khushi-411 / numpy-benchmarks

Performance Benchmarking.
1 stars 0 forks source link

Error while changing the backend of Transonic from Pythran to Numba. #6

Closed khushi-411 closed 3 years ago

khushi-411 commented 3 years ago

Command to run the program:

transonic -b numba python/acc_pythran5.py data/input16.txt

Error

Traceback (most recent call last):
  File "/home/khushi/.local/bin/transonic", line 8, in <module>
    sys.exit(run())
  File "/home/khushi/.local/lib/python3.9/site-packages/transonic/run.py", line 85, in run
    backend.make_backend_files(paths, force=args.force)
  File "/home/khushi/.local/lib/python3.9/site-packages/transonic/backends/base.py", line 75, in make_backend_files
    analyse = analyse_aot(code, path, self.name)
  File "/home/khushi/.local/lib/python3.9/site-packages/transonic/analyses/__init__.py", line 276, in analyse_aot
    module = extast.parse(code)
  File "/home/khushi/.local/lib/python3.9/site-packages/transonic/analyses/extast.py", line 45, in parse
    tree = gast.parse(code, *args, **kwargs)
  File "/home/khushi/.local/lib/python3.9/site-packages/gast/gast.py", line 307, in parse
    return ast_to_gast(_ast.parse(*args, **kwargs))
  File "/usr/lib/python3.9/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    -1 0.0625 0.214835865608654947  -0.120469325327368135  -0.2661811268232539 0.757849421156586822  0.157644506165220161  -0.0715602005208729741
       ^
SyntaxError: invalid syntax
khushi-411 commented 3 years ago

Solution

Problem with the above command

One needs some basic understanding to resolve this error. The command I mentioned compiles the data files too, which is not correct. The task was to compile the code using Transonic as a medium to accelerate the Python code.

Theory behind backends

Reason for Error

Command to run