Skip to content

Commit

Permalink
Specify cl_cache_dir env var: (#2581)
Browse files Browse the repository at this point in the history
1. General behaviour doesn't work for some compute-runtime versions.
Specification of `cl_cache_dir` fixes it
  • Loading branch information
vurusovs authored Oct 8, 2020
1 parent 474dcc2 commit a4fe59b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/time_tests/test_runner/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""

# pylint:disable=import-error
import os
import sys
import pytest
from pathlib import Path
Expand Down Expand Up @@ -115,6 +116,9 @@ def cl_cache_dir(pytestconfig):
More: https://github.com/intel/compute-runtime/blob/master/opencl/doc/FAQ.md#how-can-cl_cache-be-enabled
"""
cl_cache_dir = pytestconfig.invocation_dir / "cl_cache"
# if cl_cache generation to a local `cl_cache` folder doesn't work, specify
# `cl_cache_dir` environment variable in an attempt to fix it (Linux specific)
os.environ["cl_cache_dir"] = str(cl_cache_dir)
if cl_cache_dir.exists():
shutil.rmtree(cl_cache_dir)
cl_cache_dir.mkdir()
Expand Down

0 comments on commit a4fe59b

Please sign in to comment.