Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamping CMakeList #250

Open
skn123 opened this issue Jun 30, 2018 · 1 comment
Open

Revamping CMakeList #250

skn123 opened this issue Jun 30, 2018 · 1 comment

Comments

@skn123
Copy link

skn123 commented Jun 30, 2018

Please go to Stack Overflow for help and support:

https://stackoverflow.com/questions/tagged/tensorflow

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.
  3. It shouldn't be a TensorBoard issue. Those go here.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • TensorFlow installed from (source or binary):
  • TensorFlow version (use command below):
  • Python version:
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:
  • Exact command to reproduce:

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Describe the problem

Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.
Need a revamp of contrib/cmake/CMakeLists.txt to account for ComputeCPP

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
No logs are needed as this is a feature request.
I am trying to rebuild the dev/amd_gpu version of TF and for that I would need to revamp the entire CMakeLists file(s). My first target would be to build a C++ example and then I will attempt the python version (which itself looks pretty messy).
In this regard, are there any special #define flags that need to be defined for ComputeCpp?

@DuncanMcBain
Copy link
Collaborator

Hi @skn123,
thanks for your interest in contributing. As it happens, there's more than a couple of defines required for building TensorFlow with ComputeCpp! Forgive me if you've seen this, but because ComputeCpp interacts with OpenCL devices, a separate compiler is required to output instructions they can execute. As it happens we maintain a FindComputeCpp.cmake module which does basically everything. It's recently been revamped to be much better-behaved and more in-line with modern CMake, this should be the last interface change for a while.

If you'd like to attempt a CMake build of TensorFlow + ComputeCpp, I would advise starting here. You can find some example usage of the module in the linked respository - the important function is "add_sycl_to_target", which will compile all the sources in a target with compute++ (our device compiler) and make sure that code is in the objects produced. I can understand that this might not be desireable - in which case you can use the function "__build_ir" directly, which might be more useful in this case. It operates on single source files, so you'd have a little more control.

If you have any other questions, please ask me, I've spent a bunch of time working on the module recently (however, I have no idea how what TensorFlow's CMake looks like :p).

In terms of special defines... I think the bazel configuration for SYCL should list them all. I can't remember offhand but there are a couple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants