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

Merges latest changes from main to gold/2021 #1445

Merged
merged 23 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3f31e8c
Bump github/codeql-action from 3.24.9 to 3.24.10
dependabot[bot] Apr 8, 2024
1336f76
Merge pull request #1433 from IntelPython/dependabot/github_actions/g…
Apr 8, 2024
ff5b714
fixing dpnp failure caused by addition of nin, nout and ntypes
adarshyoga Apr 11, 2024
c793313
Patch dpnpdecl to handle removal of nin, nout in dpnp.
Apr 17, 2024
4708ac7
Merge pull request #1434 from IntelPython/fix/dpnp_nin_issue
Apr 17, 2024
1fd7893
Bump peaceiris/actions-gh-pages from 3.9.3 to 4.0.0
dependabot[bot] Apr 15, 2024
e625c9d
Merge pull request #1437 from IntelPython/dependabot/github_actions/p…
Apr 19, 2024
f1bd0eb
Bump github/codeql-action from 3.24.10 to 3.25.1
dependabot[bot] Apr 22, 2024
0972830
Merge pull request #1440 from IntelPython/dependabot/github_actions/g…
Apr 22, 2024
289db47
Pin dpcpp-llvm-spirv version
ZzEeKkAa Apr 22, 2024
9ef3a7a
Merge pull request #1441 from IntelPython/fix/pin_dpcpp-llvm-spirv
Apr 23, 2024
3aef476
Remove dpcpp 2023 restriction workaround
ZzEeKkAa Apr 24, 2024
a05044e
Merge pull request #1442 from IntelPython/feature/remove_dpcpp_2023_r…
Apr 24, 2024
d3f7793
Bump github/codeql-action from 3.25.1 to 3.25.3
dependabot[bot] Apr 29, 2024
a60d032
Merge pull request #1444 from IntelPython/dependabot/github_actions/g…
ZzEeKkAa Apr 29, 2024
06af70b
Use argument queue_ref for empty array allocation for parfor
ZzEeKkAa Apr 29, 2024
eb0acbb
Update config import to avoid circular imports
ZzEeKkAa Apr 29, 2024
41b5d25
Add dedicated parfor injection pass for kernels
ZzEeKkAa Apr 29, 2024
675cb79
Merge pull request #1435 from IntelPython/fix/windows-parfor
Apr 30, 2024
ae07cb6
Add the mangled_Args property to kernel_api types.
Apr 24, 2024
0287101
Fixes breakpoint on function name.
Apr 26, 2024
71cc99f
Update test cases based on latest changes to DWARF generation.
Apr 26, 2024
72a3167
Merge pull request #1443 from IntelPython/improve/function_arg_mangling
ZzEeKkAa Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
run: make html

- name: GitHub Pages [main]
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4.0.0

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -64,7 +64,7 @@
user_email: 'github-actions[bot]@users.noreply.github.com'

- name: GitHub Pages [PR]
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4.0.0

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
if: ${{ github.event.pull_request && github.event.action != 'closed' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -88,7 +88,7 @@

- name: Publish release
if: startsWith(github.ref, 'refs/heads/release')
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4.0.0

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir : next_release
Expand All @@ -104,7 +104,7 @@

- name: Publish tag
if: startsWith(github.ref, 'refs/tags/')
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4.0.0

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir : ${{ steps.capture_tag.outputs.tag_number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openssf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: ${{ github.event_name == 'push' }}
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
sarif_file: results.sarif
9 changes: 6 additions & 3 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ requirements:
- dpctl >=0.16.1
- dpnp >=0.14
- numpy >=1.24
# TODO: there is no 2024 release for python 3.11
# - dpcpp-llvm-spirv >={{ required_compiler_version }}
- dpcpp-llvm-spirv >=2023.0
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
- dpcpp-llvm-spirv >={{ required_compiler_version }} # [not win]
- dpcpp-llvm-spirv >={{ required_compiler_version }},<2024.1 # [win]
- wheel >=0.43
- pip >=24.0
- python-build >=1.1
Expand All @@ -50,6 +50,9 @@ requirements:
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }}
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }} # [not win]
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x', upper_bound='2024.1') }} # [win]
- {{ pin_compatible('dpnp', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('dpctl', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('numba', min_pin='x.x.x', max_pin='x.x') }}
Expand Down
43 changes: 43 additions & 0 deletions numba_dpex/core/debuginfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: 2020 - 2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

"""Implements a custom debug metadata generator class for numba-dpex kernels.
"""

from numba.core import debuginfo


class DIBuilder(debuginfo.DIBuilder):
"""Overrides Numba's default DIBuilder with numba-dpex-specific customizations."""

# pylint: disable=too-many-arguments
def mark_subprogram(self, function, qualname, argnames, argtypes, line):
"""Sets DW_AT_name and DW_AT_linkagename tags for a kernel decorated function.

Numba generates a unique name for every function it compiles, but in
upstream Numba the unique name is not used as the "qualified" name of
the function. The behavior leads to a bug discovered in Numba-dpex when
a compiled function uses closure variables.
Refer (https://github.com/IntelPython/numba-dpex/issues/898).
To resolve the issue numba-dpex uses the unique_name as the qualified
name. Refer to
:class:`numba_dpex.core.passes.passes.QualNameDisambiguationLowering`.
However, doing so breaks setting GDB breakpoints based on function
name as the function name is no longer what is in the source, but what
is the unique name generated by Numba. To fix it, numba-dpex uses a
modified DISubprogram metadata generator. The name (DW_AT_name) tag is
set to the base function name, discarding the unique qualifier and
linkagename is set to an empty string.
"""
name = qualname[0 : qualname.find("$")] # noqa: E203
argmap = dict(zip(argnames, argtypes))

di_subp = self._add_subprogram(
name=name,
linkagename="",
line=line,
function=function,
argmap=argmap,
)
function.set_metadata("dbg", di_subp)
3 changes: 3 additions & 0 deletions numba_dpex/core/descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class DpexTargetOptions(CPUTargetOptions):
no_compile = _option_mapping("no_compile")
inline_threshold = _option_mapping("inline_threshold")
_compilation_mode = _option_mapping("_compilation_mode")
# TODO: create separate parfor kernel target
_parfor_body_args = _option_mapping("_parfor_body_args")

def finalize(self, flags, options):
super().finalize(flags, options)
Expand All @@ -63,6 +65,7 @@ def finalize(self, flags, options):
_inherit_if_not_set(
flags, options, "_compilation_mode", CompilationMode.KERNEL
)
_inherit_if_not_set(flags, options, "_parfor_body_args", None)


class DpexKernelTarget(TargetDescriptor):
Expand Down
Loading
Loading