@@ -193,20 +193,24 @@ jobs:
193
193
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
194
194
- uses : conda-incubator/setup-miniconda@v2
195
195
with :
196
- auto-activate-base : true
197
- activate-environment : " "
196
+ use-only-tar-bz2 : true
197
+ auto-update-conda : true
198
+ miniconda-version : ' latest'
199
+ activate-environment : " dpctl_test"
198
200
- name : Install conda-build
201
+ shell : cmd /C CALL {0}
199
202
# Needed to be able to run conda index
200
203
run : conda install conda-build
201
204
- name : Create conda channel
205
+ shell : cmd /C CALL {0}
202
206
run : |
203
207
echo ${{ env.workdir }}
204
208
mkdir ${{ env.workdir }}\channel\win-64
205
209
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
206
210
conda index ${{ env.workdir }}/channel
207
211
# Test channel
208
212
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
209
- more ${{ env.workdir }}\ver.json
213
+ type ${{ env.workdir }}\ver.json
210
214
- name : Collect dependencies
211
215
shell : cmd /C CALL {0}
212
216
run : |
@@ -219,7 +223,11 @@ jobs:
219
223
SET PACKAGE_VERSION=%%F
220
224
)
221
225
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
222
- more lockfile
226
+ - name : Display lockfile content
227
+ shell : cmd /C CALL {0}
228
+ run : |
229
+ echo "Outputting content of lockfile:"
230
+ type lockfile
223
231
- name : Cache conda packages
224
232
uses : actions/cache@v3
225
233
env :
@@ -232,6 +240,7 @@ jobs:
232
240
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
233
241
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
234
242
- name : Install opencl_rt
243
+ shell : cmd /C CALL {0}
235
244
run : conda install opencl_rt -c intel --override-channels
236
245
- name : Install dpctl
237
246
shell : cmd /C CALL {0}
@@ -243,12 +252,17 @@ jobs:
243
252
SET PACKAGE_VERSION=%%F
244
253
)
245
254
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
246
- REM Test installed packages
255
+ - name : Report content of test environemtn
256
+ shell : cmd /C CALL {0}
257
+ run : |
258
+ conda info
259
+ echo "Value of CONDA enviroment variable was: " %CONDA%
247
260
conda list
248
261
- name : Add library
249
262
shell : pwsh
250
263
run : |
251
- echo "OCL_ICD_FILENAMES=C:\Miniconda\Library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
264
+ $conda_env_library = $env:CONDA_PREFIX\Library
265
+ echo "OCL_ICD_FILENAMES=$conda_env_library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
252
266
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
253
267
if ($list.count -eq 0) {
254
268
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos)) {
@@ -260,12 +274,12 @@ jobs:
260
274
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)) {
261
275
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors
262
276
}
263
- New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name C:\Miniconda\Library \lib\intelocl64.dll -Value 0
277
+ New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name $conda_env_library \lib\intelocl64.dll -Value 0
264
278
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
265
279
Write-Output $(Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)
266
280
# Now copy OpenCL.dll into system folder
267
281
$system_ocl_icd_loader="C:\Windows\System32\OpenCL.dll"
268
- $python_ocl_icd_loader="C:\Miniconda\Library \bin\OpenCL.dll"
282
+ $python_ocl_icd_loader="$conda_env_library \bin\OpenCL.dll"
269
283
Copy-Item -Path $python_ocl_icd_loader -Destination $system_ocl_icd_loader
270
284
if (Test-Path -Path $system_ocl_icd_loader) {
271
285
Write-Output "$system_ocl_icd_loader has been copied"
@@ -275,12 +289,13 @@ jobs:
275
289
Write-Output "OCL-ICD-Loader was not copied"
276
290
}
277
291
# Variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
278
- $cl_cfg="C:\Miniconda\Library \lib\cl.cfg"
279
- (Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', 'CL_CONFIG_TBB_DLL_PATH = C:\Miniconda\Library \bin' | Set-Content $cl_cfg
292
+ $cl_cfg="$conda_env_library \lib\cl.cfg"
293
+ (Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', 'CL_CONFIG_TBB_DLL_PATH = $conda_env_library \bin' | Set-Content $cl_cfg
280
294
}
281
295
- name : Smoke test
282
296
shell : cmd /C CALL {0}
283
297
run : |
298
+ python -c "import sys; print(sys.executable)"
284
299
set SYCL_ENABLE_HOST_DEVICE=1
285
300
python -c "import dpctl; dpctl.lsplatform()"
286
301
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
@@ -289,6 +304,7 @@ jobs:
289
304
shell : cmd /C CALL {0}
290
305
run : |
291
306
set SYCL_ENABLE_HOST_DEVICE=1
307
+ python -c "import sys; print(sys.executable)"
292
308
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
293
309
294
310
upload_linux :
0 commit comments