Page MenuHome

Blender: Patch for Intel Compiler ( 2016, 2017, 2018 )
ClosedPublic

Authored by Milan Jaros (jar091) on Mar 19 2018, 5:43 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Campbell Barton (campbellbarton) requested changes to this revision.Mar 20 2018, 10:31 AM
Campbell Barton (campbellbarton) added inline comments.
source/blender/blenkernel/CMakeLists.txt
536–544 ↗(On Diff #10206)

Would rather not have compiler flag manipulation in nested CMake files.

Especially since blenkernel is such a large module.

Does intel compiler support an optimization pragma?, eg: https://stackoverflow.com/a/2220565/432509

This revision now requires changes to proceed.Mar 20 2018, 10:31 AM
Brecht Van Lommel (brecht) requested changes to this revision.EditedMar 20 2018, 12:19 PM

No need to mention your name in comments, that's what we have version control for, and use /* */ style.

intern/cycles/CMakeLists.txt
127

More accurate to say: does not support SSE2 flag.

Also put comment on line above to keep line short.

source/blender/blenkernel/CMakeLists.txt
536–544 ↗(On Diff #10206)

Right, better disable optimizations for a specific function or file that causes problems.

I made changes according to suggestions.

Milan Jaros (jar091) marked an inline comment as done.Mar 20 2018, 2:41 PM

Just out of curiosity, these functions that cause crashes, are these intel compiler bugs or are we masking actual problems in our code?

Just out of curiosity, these functions that cause crashes, are these intel compiler bugs or are we masking actual problems in our code?

Hi,

it depends:

  • float4 copy constructor - it was very hard to find it. I think ICC has problem with many inline functions. There is a comment from Sergey about crashes with other compilers than GCC in the inline function of the texture source code. I would like to report it to Intel.
  • about optimization - ICC is more agressive than GCC.
  • there is still problem with Intel Compiler 2018 in some cases but I did not find it, yet:)
source/blender/blenkernel/intern/displist.c
301

Should say which version of the compiler crashes, so we can check to remove this in the future if the issue is fixed.

intern/cycles/util/util_types_float4.h
37–40

Can we just remove this constructor, so we don't have compiler-specific compilation errors?

intern/cycles/util/util_types_float4.h
37–40

I think, yes, we can remove this copy constructor. The default copy constructor from the compiler could be better in this case. How could I remove it: #if 0 or remove this lines? Thanks. Milan

source/blender/blenkernel/intern/displist.c
301

I tried ICC 18.0.1. I will add the version to the comment.

intern/cycles/util/util_types_float4.h
37–40

Just remove lines is fine.

source/blender/blenkernel/intern/displist.c
301

Think it would be better to use: optimization_level here. In general it's better not to disable optimizations entirely.

https://software.intel.com/en-us/node/524551

The copy constructor of float4 was removed. The pragma with optimization was changed.

Looks good to me now.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 2 2018, 4:53 PM
This revision was automatically updated to reflect the committed changes.

@Milan Jaros (jar091) could you provide a windows or Linux build of latest master using intel compiler 2018 to compare performance in different use cases?

@Milan Jaros (jar091) could you provide a windows or Linux build of latest master using intel compiler 2018 to compare performance in different use cases?

Hi,

You can try this build for linux:

https://code.it4i.cz/blender/builds0/tree/master/intel2018

Milan