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

Devel blas #1022

Draft
wants to merge 16 commits into
base: devel
Choose a base branch
from
Draft

Devel blas #1022

wants to merge 16 commits into from

Conversation

ratnania
Copy link
Collaborator

@ratnania ratnania commented Nov 3, 2021

The BLAS wrappers are implemented.

TODO

  • Move the functions in tests/epyccel/modules/blas.py to pyccel/stdlib/external/blas.py
  • Use @inline decorator (available since Add inline decorator to pyccel #1017 was merged) when header language is not sufficient for mapping the arguments from Fortran to Python
  • Make sure that all functions have the same signature as those in scipy.linalg.blas and scipy.linalg.lapack
  • Add unit tests for BLAS which actually check the results of each function

Comment on lines +750 to +751
flag_uplo = 'U'
if lower : flag_uplo = 'L'
Copy link
Member

Choose a reason for hiding this comment

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

Why not use an If Ternary operator?

def blas_drotmg(d1: 'float64', d2: 'float64', x1: 'float64', y1: 'float64',
param: 'float64[:]'):

import numpy as np
Copy link
Member

Choose a reason for hiding this comment

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

There are lots of unused import numpy as np statements in this file. They should be flagged by codacy when it starts working again

Copy link
Member

@EmilyBourne EmilyBourne left a comment

Choose a reason for hiding this comment

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

Have I understood correctly that the aim is for the file tests/epyccel/modules/blas.py to become pyccel/stdlib/external/blas.pyh once PR #1017 is merged? And the file tests/epyccel/test_blas.py would then be rewritten to compile functions which call scipy?

Comment on lines +104 to +105
assert(np.abs(c - expected_c) < 1.e-10)
assert(np.abs(s - expected_s) < 1.e-10)
Copy link
Member

Choose a reason for hiding this comment

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

You can also use np.isclose as in the numpy test files, which takes an absolute and relative tolerance

@EmilyBourne EmilyBourne linked an issue May 30, 2022 that may be closed by this pull request
@yguclu yguclu assigned rakati and unassigned rakati Mar 3, 2023
@yguclu yguclu added the Feature adding new features label Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Apr 13, 2023

Ran tests on commit fd98fac, for more details see here

  • ✔️ docs / Documentation Format
  • ❌ linux / Unit tests
  • ✔️ lint / Best practices
  • ❌ macosx / Unit tests
  • ✔️ pylint / Python best practices
  • ✔️ spelling / Documentation spellcheck
  • ✔️ windows / Unit tests

@github-actions github-actions bot marked this pull request as draft April 13, 2023 11:52
@github-actions
Copy link

Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed with /bot mark as ready.

The failing tests are:

  • linux / Unit tests
  • macosx / Unit tests
  • Codacy Static Code Analysis

@EmilyBourne
Copy link
Member

@rakati I see that you were assigned to this issue in March. Are you working on it at all or should you be removed from the assignees?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature adding new features Language:Fortran
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix bugs in BLAS header file
5 participants