Skip to content

[BUG] Bad parallel performance when optimizing a group #2005

@fluidray

Description

@fluidray

Describe the bug

In Windows, when optimizing a shader group in parallel, the performance is almost as the optimization is performed sequentially.

I tracked down the problem, in src\liboslexec\llvm_instance.cpp.

In the block inside if (use_rs_bitcode()) {
the call to ll.validate_global_mappings(names_of_unmapped_globals); triggers a global lock inside llvm.

commenting out the validation solves the problem. A possible solution would be to have an option to turn off validation, so I can turn it on only during debugging.

OSL version and dependencies

  • OSL branch/version: 1.14.5.1
  • OS: Windows
  • C++ compiler: MSVC 2022
  • LLVM version: 19.1.7
  • OIIO version: 3.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions