cumm icon indicating copy to clipboard operation
cumm copied to clipboard

compilation break

Open YishGene opened this issue 3 years ago • 4 comments

Hi,

It seems that a commit you made on Friday broke the compilation for the cumm library. My command for compilation (in a dockerfile) is this:

RUN git clone https://github.com/FindDefinition/cumm &&
cd ./cumm &&
export CUMM_DISABLE_JIT="1" &&
python -m pip install -e .

Errors look like this: They didn't happen before Friday and they seem to be related to the changes you made.

/workspace/cumm/include/tensorview/tensor.h:243:17: error: ‘struct tv::Context’ has no member named ‘has_cuda_stream’ 243 | if (ctx.has_cuda_stream()) {

/workspace/cumm/include/tensorview/tensor.h:245:42: error: ‘struct tv::Context’ has no member named ‘cuda_stream’ 245 | size_ * sizeof(T), ctx.cuda_stream());

YishGene avatar Nov 21 '21 11:11 YishGene

This is a bug, these code should be covered by TV_CUDA macro, will be fixed soon. Do you use export CUMM_CUDA_VERSION=""? If you haven't set this env, the cuda build should be enabled and your bug should't exist, this bug should only exists in CPU-only build. by the way, you shouldn't use export CUMM_DISABLE_JIT="1" in editable install. I will update readme for this.

FindDefinition avatar Nov 21 '21 11:11 FindDefinition

Thanks for the quick reply!

I'm not exporting CUMM_CUDA_VERSION; I am building the docker on a machine without gpu, maybe this is the reason? Rolling back to the previous commit before this removes the bug and I can build the package without a problem.

YishGene avatar Nov 21 '21 12:11 YishGene

~~Your problem shouldn't happen if you haven't set CUMM_CUDA_VERSION. you can print that env to check whether TV_CUDA is set.~~ The problem come from this, I need to change this logic. Some notes:

  1. If you want to build cumm for spconv, you need to build cumm with CUDA because spconv + cuda need cumm + cuda.
  2. you can check official build script(github actions).
  3. you can check tags to get stable code, the main branch may contains bugs.

FindDefinition avatar Nov 21 '21 12:11 FindDefinition

Thanks Yan!

I'm building on a cuda docker so I think that is covered, I'll check the official build to see if I can get any more insights from there.

YishGene avatar Nov 21 '21 14:11 YishGene