Check if a computecpp toolkit path is valid.
(toolkit_path)
| 1091 | """Set COMPUTECPP_TOOLKIT_PATH.""" |
| 1092 | |
| 1093 | def toolkit_exists(toolkit_path): |
| 1094 | """Check if a computecpp toolkit path is valid.""" |
| 1095 | if is_linux(): |
| 1096 | sycl_rt_lib_path = 'lib/libComputeCpp.so' |
| 1097 | else: |
| 1098 | sycl_rt_lib_path = '' |
| 1099 | |
| 1100 | sycl_rt_lib_path_full = os.path.join(toolkit_path, sycl_rt_lib_path) |
| 1101 | exists = os.path.exists(sycl_rt_lib_path_full) |
| 1102 | if not exists: |
| 1103 | print('Invalid SYCL %s library path. %s cannot be found' % |
| 1104 | (_TF_OPENCL_VERSION, sycl_rt_lib_path_full)) |
| 1105 | return exists |
| 1106 | |
| 1107 | computecpp_toolkit_path = prompt_loop_or_load_from_env( |
| 1108 | environ_cp, |