simit-lang / simit

A language for computing on sparse systems
http://simit-lang.org
Other
456 stars 52 forks source link

Can't compile with SIMIT_CUDA_ENABLE=1 #57

Closed amarant closed 8 years ago

amarant commented 8 years ago

Hi, I successfully compiled simit with clang and gcc and ran it with the CPU back-end, but with the GPU back-end (activated with export SIMIT_CUDA_ENABLE=1) I ended up with errors during the compilation.

In file included from /home/???/Code/simit/src/backend/backend.cpp:6:
/home/???/Code/simit/src/backend/gpu/gpu_backend.h:62:34: error: no type named 'Call' in namespace
      'simit::ir'
  virtual void compile(const ir::Call&);
                             ~~~~^
/home/???/Code/simit/src/backend/backend.cpp:26:12: error: cannot initialize return object of type
      'simit::backend::BackendImpl *' with an rvalue of type 'backend::GPUBackend *'
    return new backend::GPUBackend();
           ^~~~~~~~~~~~~~~~~~~~~~~~~
>clang --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
>gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

Any ideas that would correct it ? Thanks.

gkanwar commented 8 years ago

Hi Arnaud -- we're working on fixing up compilation and other bugs in the GPU backend right now, so we should be up to speed very soon. Details in PR #47

amarant commented 8 years ago

So I could compile it with CUDA enabled after having compiled LLVM with RTTI with -DLLVM_ENABLE_RTTI=ON, but I got an error on execution :

Compiler bug at simit/src/backend/gpu/gpu_backend.cpp:806 in emitAtomicLoadAdd Please report it to http://issues.simit-lang.org Unknown LLVM value type for atomic load add. Ensure you are executing GPU compilation with single-precision floats. terminate called after throwing an instance of 'simit::SimitException' what():

gkanwar commented 8 years ago

This generally occurs if you attempt to compile a program with double-precision floats enabled, as the relevant atomic operation is only supported for single-precision with our current method of compilation. Make sure you call simit::init("gpu", sizeof(float)).

amarant commented 8 years ago

Thanks, it worked in its way ...

Using CUDA Device [0]: GeForce GTX 670 Device Compute Capability: 3.0 ERROR: Device 0 is not SM 3.5 or greater

Time you buy a new GC i guess :laughing:

gkanwar commented 8 years ago

Ah, well that puts a damper on things! I'm going to go ahead and close this issue.