Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated

### Removed
* Removed the deprecated `dpctl.program` submodule, use `dpctl.compiler` instead [gh-2407](https://github.com/IntelPython/dpctl/pull/2407)

### Fixed

Expand Down
1 change: 0 additions & 1 deletion docs/_legacy/generate_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"dpctl.tensor._reshape": "Array Manipulation",
"dpctl.tensor._manipulation_functions": "Array Manipulation",
"dpctl.memory._memory": "Functions",
"dpctl.program._program": "Functions",
"dpctl.utils._compute_follows_data": "Functions",
}

Expand Down
2 changes: 0 additions & 2 deletions docs/doc_sources/api_reference/dpctl/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
- Unified Shared Memory operations
* - :py:mod:`dpctl.compiler`
- Support for working with SYCL kernels
* - :py:mod:`dpctl.program`
- (deprecated, use :py:mod:`dpctl.compiler`)
* - :py:mod:`dpctl.utils`
- A collection of utility functions

Expand Down
30 changes: 0 additions & 30 deletions docs/doc_sources/api_reference/dpctl/program.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/doc_sources/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ The package ``dpctl`` provides
- :ref:`API objects <dpctl_pyapi>` in :py:mod:`dpctl` namespace
- :ref:`API objects <dpctl_memory_pyapi>` in :py:mod:`dpctl.memory` namespace
- :ref:`API objects <dpctl_compiler_pyapi>` in :py:mod:`dpctl.compiler` namespace
- :ref:`API objects <dpctl_program_pyapi>` in :py:mod:`dpctl.program` namespace (deprecated, use :py:mod:`dpctl.compiler`)
- :ref:`API objects <dpctl_utils_pyapi>` in :py:mod:`dpctl.utils` namespace
* Python C API
- :ref:`C API <dpctl_capi>` for working with Python classes defined in :mod:`dpctl`
Expand All @@ -33,7 +32,6 @@ The package ``dpctl`` provides
dpctl/index
dpctl/memory
dpctl/compiler
dpctl/program
dpctl/utils
libsyclinterface/index
dpctl_capi
Expand Down
1 change: 0 additions & 1 deletion docs/doc_sources/known_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ SyclContext
SyclEvent
SyclKernel
SyclKernelBundle
SyclProgram
SyclPlatform
dtype
ndarray
Expand Down
1 change: 0 additions & 1 deletion dpctl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
__all__ += [
"memory",
"compiler",
"program",
"utils",
]

Expand Down
74 changes: 0 additions & 74 deletions dpctl/program/__init__.py

This file was deleted.

60 changes: 0 additions & 60 deletions dpctl/program/_program.py

This file was deleted.

56 changes: 0 additions & 56 deletions dpctl/tests/test_sycl_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
"""Defines unit test cases for the SyclKernelBundle and SyclKernel classes"""

import os
import warnings

import numpy as np
import pytest

import dpctl
import dpctl.compiler as dpc
import dpctl.memory as dpm
import dpctl.program as dpp
from dpctl.compiler.utils import parse_spirv_specializations


Expand Down Expand Up @@ -721,57 +719,3 @@ def test_sycl_source_vector_add_correctness(queue_selector):
ev4 = q.memcpy_async(dest=out, src=out_usm, count=out.nbytes, dEvents=[ev3])
ev4.wait()
assert np.array_equal(out, expected)


@pytest.mark.parametrize(
"deprecated_name, replacement",
[
("SyclProgram", dpc.SyclKernelBundle),
("SyclProgramCompilationError", dpc.SyclKernelBundleCompilationError),
],
)
def test_program_deprecated_aliases(deprecated_name, replacement):
with pytest.warns(DeprecationWarning, match=deprecated_name):
alias = getattr(dpp, deprecated_name)

assert alias is replacement


def test_program_all_names_are_reachable():
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
for name in dpp.__all__:
assert getattr(dpp, name) is not None


def test_create_program_from_source_is_deprecated():
q = _get_opencl_queue_or_skip()
oclSrc = " \
kernel void add(global int* a, global int* b, global int* c) { \
size_t index = get_global_id(0); \
c[index] = a[index] + b[index]; \
}"
with pytest.warns(
DeprecationWarning, match="create_program_from_source is deprecated"
):
kb = dpp.create_program_from_source(q, oclSrc)

assert type(kb) is dpc.SyclKernelBundle
assert kb.has_sycl_kernel("add")


def test_create_program_from_spirv_is_deprecated():
import dpctl.program as dpp

q = _get_opencl_queue_or_skip()
spirv_file = get_spirv_abspath("multi_kernel.spv")
with open(spirv_file, "rb") as fin:
spirv = fin.read()
with pytest.warns(
DeprecationWarning, match="create_program_from_spirv is deprecated"
):
kb = dpp.create_program_from_spirv(q, spirv)

assert type(kb) is dpc.SyclKernelBundle
assert kb.has_sycl_kernel("add")
assert kb.has_sycl_kernel("axpy")
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"dpctl.compiler",
"dpctl.compiler.utils",
"dpctl.memory",
"dpctl.program",
"dpctl.utils",
],
package_data={
Expand Down
Loading