Skip to content

tuo rocm build with +enzyme #1496

@chapman39

Description

@chapman39

TPLs build with +enzyme but Smith tests that utilize enzyme fail with the following linker error:

**lld: error: undefined protected symbol: enzyme_const
>>> referenced by /var/tmp/meemee/tribol_finite_diff-gfx942-631f29.out.lto.o:(__clang_gpu_used_external)
>>> referenced by /var/tmp/meemee/tribol_finite_diff-gfx942-631f29.out.lto.o:(__clang_gpu_used_external.54)**

This can be reproduced by re-building TPLs on tuo with +enzyme and building the tribol_finite_diff test. I've attempted create a reproducer outside our build system without much luck.

Thoughts are it's probably related to -fgpu-rdc flag, which is similar to CUDA_SEPERABLE_COMPILATION but for HIP.

What makes it somewhat hard to debug is the object .o files disappear after failure, since they're some sort of intermediary/ temporary object file.

Another possibility is there is some dependency with what should be marked as __device__. Maybe the enzyme variables shouldn't be marked as __device__? Or more likely maybe some functions in tribol using these variables need to be marked with __device__?

Possible related links

Metadata

Metadata

Assignees

Labels

TPLThird-party librariesbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions