Skip to content

Commit

Permalink
Fix LTS failure
Browse files Browse the repository at this point in the history
Signed-off-by: Whitney Tsang <[email protected]>
  • Loading branch information
whitneywhtsang committed Dec 11, 2024
1 parent a853d16 commit d378a2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions third_party/intel/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,15 @@ def parse_target(self, tgt_prop) -> dict:
dev_prop['max_num_sub_groups'] = tgt_prop.get('max_num_sub_groups', None)
dev_prop['sub_group_sizes'] = tgt_prop.get('sub_group_sizes', None)
dev_prop['has_fp64'] = tgt_prop.get('has_fp64', None)

device_arch = self.parse_device_arch(tgt_prop.get('architecture', 0))
# Note: LTS driver does not support ocloc query CL_DEVICE_EXTENSIONS.
try:
ocloc_cmd = ['ocloc', 'query', 'CL_DEVICE_EXTENSIONS']
with tempfile.TemporaryDirectory() as temp_dir:
output = subprocess.check_output(ocloc_cmd, text=True, cwd=temp_dir)
except subprocess.CalledProcessError:
device_arch = ''
if device_arch != '':
try:
ocloc_cmd = ['ocloc', 'query', 'CL_DEVICE_EXTENSIONS', '-device', device_arch]
Expand Down

0 comments on commit d378a2b

Please sign in to comment.