Skip to content

Commit 8070499

Browse files
author
Diptorup Deb
committed
Merge tag '0.20.1' into gold/2021
Tag: 0.20.1
2 parents f738712 + dc25504 commit 8070499

File tree

26 files changed

+1564
-337
lines changed

26 files changed

+1564
-337
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore everything
2+
*
3+
4+
# Allow files and directories
5+
!/scripts/builder_entrypoint.sh
6+
!/scripts/github_load.py

.github/workflows/conda-package.yml

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,24 @@ jobs:
121121
run: |
122122
CHANNELS="-c $GITHUB_WORKSPACE/channel $CHANNELS"
123123
conda list
124-
conda create -n numba_dpex_env $PACKAGE_NAME pytest dpcpp_linux-64 python=${{ matrix.python }} numba=${{ matrix.numba }} dpctl dpnp=${{ matrix.dpnp }} $CHANNELS
124+
conda create -n numba_dpex_env $PACKAGE_NAME pytest dpcpp_linux-64 python=${{ matrix.python }} numba=${{ matrix.numba }} dpctl dpnp=${{ matrix.dpnp }} dpcpp-llvm-spirv $CHANNELS
125125
# Test installed packages
126126
conda list
127127
- name: Check DPNP
128128
run: |
129129
source $CONDA/etc/profile.d/conda.sh
130130
conda activate numba_dpex_env
131-
export OCL_ICD_FILENAMES=libintelocl.so
132131
python -c "import dpnp"
132+
- name: Check dpcpp-llvm-spirv
133+
run: |
134+
source $CONDA/etc/profile.d/conda.sh
135+
conda activate numba_dpex_env
136+
python -c "import dpcpp_llvm_spirv as p; print(p.get_llvm_spirv_path())"
133137
- name: Run tests
134138
run: |
135139
source $CONDA/etc/profile.d/conda.sh
136140
conda activate numba_dpex_env
137141
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
138-
export OCL_ICD_FILENAMES=libintelocl.so
139142
python -m pytest -q -ra --disable-warnings --pyargs $MODULE_NAME -vv
140143
- name: Run examples
141144
run: |
@@ -145,7 +148,6 @@ jobs:
145148
source $CONDA/etc/profile.d/conda.sh
146149
conda activate numba_dpex_env
147150
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
148-
export OCL_ICD_FILENAMES=libintelocl.so
149151
for script in $(find . \( -not -name "_*" -not -name "vector_sum2D.py" -not -name "vectorize.py" -not -name "scan.py" -and -name "*.py" \))
150152
do
151153
echo "Executing ${script}"
@@ -207,7 +209,7 @@ jobs:
207209
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
208210
- name: Install numba-dpex
209211
run: |
210-
conda install ${{ env.PACKAGE_NAME }} pytest dpcpp_win-64 python=${{ matrix.python }} dpctl ${{ matrix.dependencies }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}
212+
conda install ${{ env.PACKAGE_NAME }} pytest dpcpp_win-64 dpcpp-llvm-spirv python=${{ matrix.python }} dpctl ${{ matrix.dependencies }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}
211213
# Test installed packages
212214
conda list
213215
- name: Install opencl_rt
@@ -216,42 +218,18 @@ jobs:
216218
- name: Add library
217219
shell: pwsh
218220
run: |
219-
$conda_env_library = "$env:CONDA_PREFIX\Library"
220-
echo "OCL_ICD_FILENAMES=$conda_env_library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
221-
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
222-
if ($list.count -eq 0) {
223-
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos)) {
224-
New-Item -Path HKLM:\SOFTWARE\Khronos
225-
}
226-
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL)) {
227-
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL
228-
}
229-
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)) {
230-
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors
231-
}
232-
New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name $conda_env_library\lib\intelocl64.dll -Value 0
233-
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
234-
Write-Output $(Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)
235-
# Now copy OpenCL.dll into system folder
236-
$system_ocl_icd_loader="C:\Windows\System32\OpenCL.dll"
237-
$python_ocl_icd_loader="$conda_env_library\bin\OpenCL.dll"
238-
Copy-Item -Path $python_ocl_icd_loader -Destination $system_ocl_icd_loader
239-
if (Test-Path -Path $system_ocl_icd_loader) {
240-
Write-Output "$system_ocl_icd_loader has been copied"
241-
$acl = Get-Acl $system_ocl_icd_loader
242-
Write-Output $acl
243-
} else {
244-
Write-Output "OCL-ICD-Loader was not copied"
245-
}
246-
# Variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
247-
$cl_cfg="$conda_env_library\lib\cl.cfg"
248-
(Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', "CL_CONFIG_TBB_DLL_PATH = $conda_env_library\bin" | Set-Content $cl_cfg
249-
}
221+
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
222+
&$script_path
223+
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
224+
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
225+
Get-Content -Tail 5 -Path $cl_cfg
250226
251227
- name: Add dpnp skip variable
252228
run: echo "NUMBA_DPEX_TESTING_SKIP_NO_DPNP=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
253229
- name: Smoke test
254230
run: python -c "import numba_dpex.core.runtime._dpexrt_python"
231+
- name: Smoke test for dpcpp-llvm-spirv
232+
run: python -c "import dpcpp_llvm_spirv as p; print(p.get_llvm_spirv_path())"
255233
- name: Run tests
256234
run: |
257235
python -m pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv

0 commit comments

Comments
 (0)