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

Support on Windows (Experiment) #202

Open
ghost opened this issue Jan 19, 2018 · 14 comments
Open

Support on Windows (Experiment) #202

ghost opened this issue Jan 19, 2018 · 14 comments

Comments

@ghost
Copy link

ghost commented Jan 19, 2018

Due to some AMD cards are not supported by AMD-GPU-Pro, such as HD7900 series, I think that's important to work on a Windows support for AMD cards.

I am trying that...

@lukeiwanski
Copy link
Owner

Hi @kcauchy

In principle.. there is ComputeCpp for Windows.

Essentially, we did not try windows in Eigen yet - that would be a first step to do.
Please let us know how did that go :)

@DuncanMcBain
Copy link
Collaborator

To elaborate, Eigen uses features that have been historically poorly supported by Visual Studio. However, I know that 2015 is a lot better in that regard so it might work now. Unfortunately ComputeCpp doesn't (yet) support Visual Studio 2017, but works well with 2015.

@ghost
Copy link
Author

ghost commented Jan 20, 2018

As my test results under VS 2017 on Windows 10, Eigen at least can be compiled.

-- Build type:        Release
-- Build site:        desktop-o107hvb
-- Build string:      unknownwin-19.11.25547.0-32bit
-- Enabled backends:  
-- Disabled backends: Cholmod,  UmfPack,  SuperLU,  PaStiX,  METIS,  SPQR,  Qt4 support,  Boost.Multiprecision,  GoogleHash,  Adolc,  MPFR C++,  fftw,  OpenGL, 
-- Default order:     Column-major
-- Maximal matrix/vector size: 320
-- SSE2:              Using architecture defaults
-- SSE3:              Using architecture defaults
-- SSSE3:             Using architecture defaults
-- SSE4.1:            Using architecture defaults
-- SSE4.2:            Using architecture defaults
-- AVX:               Using architecture defaults
-- FMA:               Using architecture defaults
-- AVX512:            Using architecture defaults
-- Altivec:           Using architecture defaults
-- VSX:               Using architecture defaults
-- ARM NEON:          Using architecture defaults
-- ARMv8 NEON:        Using architecture defaults
-- S390X ZVECTOR:     Using architecture defaults
-- C++11:             OFF
-- SYCL:              OFF
-- CUDA:              OFF

And the compilation:

========== Build: 767 succeeded, 0 failed, 0 up-to-date, 8 skipped ==========

It seems our target is SYCL: ON right? The
compilation took over 1 hour on my 2690 v3 (1 processor only). I remember the entire tensorflow doesn't need over 1 hour on a shit machine under Ubuntu. I don't know whether it is the Eigen cached or Windows is that slow.

I will try on another 2695 v2 *2 workstation tomorrow with Visual Studio 2015. Hopefully it will be faster.

Here's the log:

@mirh
Copy link

mirh commented Jan 20, 2018

Due to some AMD cards are not supported by AMD-GPU-Pro, such as HD7900 series

Actually.. That should be no problem.

@ghost
Copy link
Author

ghost commented Jan 21, 2018

@mirh

This is the official response from AMD support team: https://community.amd.com/thread/223669/

Currently, ampdgpu-pro does not support OpenCL on SI cards including HD7900 series. AFAIK, there is no immediate plan for including SI support at this moment.

So, who told you that "no problem"?

@mirh
Copy link

mirh commented Jan 21, 2018

I guess like they might have not included all the SI fixes in the closed driver, but I cannot see why forcing amdgpu open kernel driver plus this shouldn't work.

Worst case scenario anyway, you can always use fglrx.

@ghost
Copy link
Author

ghost commented Jan 21, 2018

@lukeiwanski @DuncanMcBain Eigen is also compilable under Visual Studio 2015.

I guess the target is "SYCL: ON" instead of OFF.

@DuncanMcBain
Copy link
Collaborator

Yes, which should be doable with the CMake bits currently in Eigen (I'm not able really to check right now, but IIRC should be something like -DEIGEN_TEST_SYCL=1 -DEIGEN_USE_CXX11=1).

@welnaseth
Copy link

I'm interested in windows support as well, and am willing to help if you need people to test/compile dependencies to verify everything needed for tensorflow to run with opencl works on windows.

@lukeiwanski
Copy link
Owner

@welnaseth the first step would be to test if Eigen is working on windows ( https://bitbucket.org/mehdi_goli/opencl/commits/branch/Eigen-Optimised-Tensor-Vector-Contraction )

Could you give it a spin?

@welnaseth
Copy link

I am travelling this weekend, but will be back near my computer Sunday night, I'll try then and report back :)

@welnaseth
Copy link

Alright, So first observation is that the windows support added in codeplaysoftware/computecpp-sdk#51 to ComputeCPP did not make it into this eigen branch, i.e. the FindComputeCpp.cmake does not look for the windows library correctly. I've copy pasted FindComputeCpp.cmake from computecpp-sdk and will see if that works when compiling eigen on windows with SYCL support.

@welnaseth
Copy link

welnaseth commented Mar 13, 2018

Ok, after getting the cmake to run, I've come across the first error. In Meta.h on lines 333-334:

template<typename T>
Index size(const T& x) { return x.size(); }

Produces error c2228 with the message "left of '.size' must have class/struct/union". I'm currently looking into it, but I'll admit c++ isn't my strongest language, so if you have any idea what needs to be done to correct this error, that would be great.

@lukeiwanski
Copy link
Owner

@welnaseth thanks for checking this out! I created a separate issue so we can track that particular problem separately.

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

4 participants