forked from IntelPython/numba-dpex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request IntelPython#1269 from IntelPython/feature/set_over…
…aloads_target_specific Make overloads and intrinsic target specific
- Loading branch information
Showing
10 changed files
with
154 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
numba_dpex/tests/dpjit_tests/dpnp/test_target_specific_overload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-FileCopyrightText: 2024 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
""" | ||
Tests if dpnp dpex specific overloads are not available at numba njit. | ||
""" | ||
|
||
import dpnp | ||
import pytest | ||
from numba import njit | ||
from numba.core import errors | ||
|
||
from numba_dpex import dpjit | ||
|
||
|
||
@pytest.mark.parametrize("func", [dpnp.empty, dpnp.ones, dpnp.zeros]) | ||
def test_dpnp_dpex_target(func): | ||
def dpnp_func(): | ||
func(10) | ||
|
||
dpnp_func_njit = njit(dpnp_func) | ||
dpnp_func_dpjit = dpjit(dpnp_func) | ||
|
||
dpnp_func_dpjit() | ||
with pytest.raises(errors.TypingError): | ||
dpnp_func_njit() |
Oops, something went wrong.