Skip to content

Commit

Permalink
Avoid complaints about missing bc file if compiling for CUDA (iree-or…
Browse files Browse the repository at this point in the history
…g#15232)

Previously this would throw errors like

```
ERROR: external/iree_cuda/BUILD:45:13: Executing genrule @iree_cuda//:libdevice_embedded__generator failed: missing input file 'external/iree_cuda/iree_local/libdevice.bc', owner: '@iree_cuda//:iree_local/libdevice.bc'
```

even though the CUDA build was not enabled. Use BUILD file as bc file as
... well its there and seems to work/it isn't used in anyway with CUDA
build disabled it just has to be something that exists.
  • Loading branch information
jpienaar authored Oct 19, 2023
1 parent 479f4ed commit 4db7c1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build_tools/bazel/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def cuda_auto_configure_impl(repository_ctx):
Label("%s//:build_tools/third_party/cuda/BUILD.template" % iree_repo_alias),
{
"%ENABLED%": "True" if cuda_toolkit_root else "False",
"%LIBDEVICE_REL_PATH%": libdevice_rel_path,
"%LIBDEVICE_REL_PATH%": libdevice_rel_path if cuda_toolkit_root else "BUILD",
"%IREE_REPO_ALIAS%": iree_repo_alias,
},
)
Expand Down

0 comments on commit 4db7c1a

Please sign in to comment.