Add support for windows.

The tools from the cuda toolkit have the .exe extension on Windows.

PiperOrigin-RevId: 317610348
Change-Id: I6f4bad4c651c8ffb347f06d1aef8ffe00de90620
This commit is contained in:
Adrian Kuegel 2020-06-22 01:38:54 -07:00 committed by TensorFlower Gardener
parent 072cf7ee4b
commit 149a0a1d5a

View File

@ -5,7 +5,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "cuda_gpu_architectures", "if_cu
def _lookup_file(filegroup, path):
"""Extracts file at (relative) path in filegroup."""
for file in filegroup.files.to_list():
if file.path.endswith(path):
if file.path.endswith(path) or file.path.endswith(path + ".exe"):
return file
return None