Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugreport for complex codebase (probably some math problem) #1613

Closed
FROL256 opened this issue Jan 17, 2024 · 13 comments
Closed

Bugreport for complex codebase (probably some math problem) #1613

FROL256 opened this issue Jan 17, 2024 · 13 comments

Comments

@FROL256
Copy link

FROL256 commented Jan 17, 2024

Greetings!
I have a project on differential rendering (path tracer) which uses Enzyme.

While working with it I encounter some Enzyme bugs and i'm not sure how to report them correctly.
The problem is that i can't reproduce bug on simple code base, and simplifying the complex code base didn't helped me too -- it arises in different places related to math functions.

I have put files from clang bug report to this archive
https://drive.google.com/file/d/1NbskYqtnwYr1u4n_sppsGNw-Q8YVkrhy/view?usp=sharing

The buggy branch of my project is here
https://github.com/Ray-Tracing-Systems/HydraCore3/tree/ad_bug

It has a build instruction, but probably you will need to change some path related to clang and enzyme there ...

The problem arises on call gltfEval->FrDielectricPBRT
Inside FrDielectricPBRT different instructions are lead to bug, however the same function in separate project works
https://github.com/FROL256/enzyme_autodiff_examples

Suppose there is some problems with std::sqrt call because code complies if i remove them.
Please let me know if i could do something to make bug-report useful if it is not in that state currently)
Tnanks!

@FROL256
Copy link
Author

FROL256 commented Jan 17, 2024

i have tested both release version and from main branch

@wsmoses
Copy link
Member

wsmoses commented Jan 17, 2024 via email

@FROL256
Copy link
Author

FROL256 commented Jan 17, 2024

  • Executing task: cd cmake-build-release && make -j 8

[ 8%] Built target miniz
[ 20%] Built target ies_parser
[ 24%] Building CXX object CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o
warning: unknown warning option '-Wno-useless-cast' [-Wunknown-warning-option]
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:1:
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.h:3:
/home/frol/PROG/HydraRepos/HydraCore3/include/cglobals.h:321:17: warning: implicit conversion loses floating-point precision: 'double' to 'float' [-Wimplicit-float-conversion]
float theta = acos(z); // [0,pi]
~~~~~ ^~~~~~~
/home/frol/PROG/HydraRepos/HydraCore3/include/cglobals.h:321:22: warning: implicit conversion increases floating-point precision: 'const float' to 'double' [-Wdouble-promotion]
float theta = acos(z); // [0,pi]
~~~~ ^
/home/frol/PROG/HydraRepos/HydraCore3/include/cglobals.h:322:17: warning: implicit conversion loses floating-point precision: 'double' to 'float' [-Wimplicit-float-conversion]
float phi = atan2(y, x); // [-pi,pi]
~~~ ^~~~~~~~~~~
/home/frol/PROG/HydraRepos/HydraCore3/include/cglobals.h:322:26: warning: implicit conversion increases floating-point precision: 'const float' to 'double' [-Wdouble-promotion]
float phi = atan2(y, x); // [-pi,pi]
~~~~~ ^
/home/frol/PROG/HydraRepos/HydraCore3/include/cglobals.h:322:23: warning: implicit conversion increases floating-point precision: 'const float' to 'double' [-Wdouble-promotion]
float phi = atan2(y, x); // [-pi,pi]
~~~~~ ^
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:5:
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:151:17: warning: unused variable 'lDotN' [-Wunused-variable]
const float lDotN = std::abs(dot(l,n));
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:114:16: warning: unused variable 'specular' [-Wunused-variable]
const float4 specular = a_materials[0].colors[GLTF_COLOR_METAL];
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:115:16: warning: unused variable 'coat' [-Wunused-variable]
const float4 coat = a_materials[0].colors[GLTF_COLOR_COAT];
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:117:16: warning: variable 'alpha' set but not used [-Wunused-but-set-variable]
float alpha = a_materials[0].data[GLTF_FLOAT_ALPHA];
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:124:9: warning: variable 'ggxVal' set but not used [-Wunused-but-set-variable]
float ggxVal, ggxPdf, VdotH;
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:124:17: warning: variable 'ggxPdf' set but not used [-Wunused-but-set-variable]
float ggxVal, ggxPdf, VdotH;
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:124:25: warning: variable 'VdotH' set but not used [-Wunused-but-set-variable]
float ggxVal, ggxPdf, VdotH;
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:138:9: warning: unused variable 'lambertVal' [-Wunused-variable]
float lambertVal = lambertEvalBSDF(l, v, n);
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:139:15: warning: unused variable 'lambertPdf' [-Wunused-variable]
const float lambertPdf = lambertEvalPDF (l, v, n);
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:140:9: warning: variable 'f_i' set but not used [-Wunused-but-set-variable]
float f_i = 1.0f;
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:141:9: warning: unused variable 'prob_diffuse' [-Wunused-variable]
float prob_diffuse = 1.0f;
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:142:9: warning: unused variable 'prob_specular' [-Wunused-variable]
float prob_specular = 0.0f;
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_gltf.h:143:9: warning: unused variable 'coeffLambertPdf' [-Wunused-variable]
float coeffLambertPdf = 1.0f;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:25:34: warning: missing field 'fheight' initializer [-Wmissing-field-initializers]
texInfo = {size_t(-1),0,0,0,0};
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:159:16: warning: unused variable 'rands' [-Wunused-variable]
const float4 rands = float4(drands[bounceRND_PER_BOUNCE + RND_MTL_ID + 0], drands[bounceRND_PER_BOUNCE + RND_MTL_ID + 1],
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:162:16: warning: unused variable 'color' [-Wunused-variable]
const float4 color = m_materials[currMatId].colors[GLTF_COLOR_BASE]texColor;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:191:16: warning: unused variable 'shadeNormal' [-Wunused-variable]
float3 shadeNormal = n;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:342:22: warning: declaration shadows a local variable [-Wshadow]
const float4 color = (m_materials[currMat.id].colors[GLTF_COLOR_BASE]) * texColor;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:279:16: note: previous declaration is here
const float4 color = m_materials[a_materialId].colors[GLTF_COLOR_BASE] * texColor;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:313:18: warning: unused variable 'geomNormal' [-Wunused-variable]
const float3 geomNormal = n;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:279:16: warning: unused variable 'color' [-Wunused-variable]
const float4 color = m_materials[a_materialId].colors[GLTF_COLOR_BASE] * texColor;
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:582:16: warning: unused variable 'hitDist' [-Wunused-variable]
const float hitDist = std::sqrt(dot(hit.pos - lSam.pos, hit.pos - lSam.pos));
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:1210:10: warning: unused variable 'hitNorm' [-Wunused-variable]
float3 hitNorm = to_float3(data1);
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:1211:10: warning: unused variable 'hitTang' [-Wunused-variable]
float3 hitTang = to_float3(data2);
^
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:1256:17: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
double summ = 0.0f;
~~~~ ^~~~
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:1269:17: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
double summ = 0.0f;
~~~~ ^~~~
/home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:1291:17: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
double summ = 0.0f;
~~~~ ^~~~
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:6:
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_conductor.h:31:13: warning: unused function 'conductorSmoothEval' [-Wunused-function]
static void conductorSmoothEval(const Material
a_materials, float4 wavelengths, float3 l, float3 v, float3 n, float2 tc,
^
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_conductor.h:101:13: warning: unused function 'conductorRoughEval' [-Wunused-function]
static void conductorRoughEval(const Material* a_materials, const float4 etaSpec, const float4 kSpec,
^
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:7:
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_glass.h:343:13: warning: unused function 'glassEval' [-Wunused-function]
static void glassEval(const Material* a_materials, float3 l, float3 v, float3 n, float2 tc,
^
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:8:
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_diffuse.h:27:13: warning: unused function 'diffuseEval' [-Wunused-function]
static void diffuseEval(const Material* a_materials, float4 a_reflSpec, float3 l, float3 v, float3 n, float2 tc,
^
In file included from /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp:9:
/home/frol/PROG/HydraRepos/HydraCore3/include/cmat_plastic.h:110:13: warning: unused function 'plasticEval' [-Wunused-function]
static void plasticEval(const Material* a_materials, float4 a_reflSpec, float3 l, float3 v, float3 n, float2 tc,
^
clang++-16: /home/frol/PROG/enzyme_main/enzyme/Enzyme/ActivityAnalysis.cpp:2423: bool ActivityAnalyzer::isInstructionInactiveFromOrigin(const TypeResults &, llvm::Value *, bool): Assertion `!isa(val)' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/clang++-16 -DUSE_ENZYME -D_CRT_SECURE_NO_WARNINGS -I/home/frol/PROG/HydraRepos/HydraCore3 -I/home/frol/PROG/HydraRepos/HydraCore3/external -I/home/frol/PROG/HydraRepos/HydraCore3/external/vkutils -I/home/frol/PROG/HydraRepos/HydraCore3/external/CrossRT -isystem /home/frol/PROG/HydraRepos/HydraCore3/external/tinyexr -isystem /home/frol/PROG/HydraRepos/HydraCore3/external/volk -isystem /home/frol/PROG/HydraRepos/HydraCore3/external/LiteMath -O3 -DNDEBUG "-fopenmp=libomp " -fplugin=/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wno-sign-conversion -Wno-useless-cast -Wno-unused-parameter -Wno-unknown-attributes -Wnull-dereference -Wdouble-promotion -Wformat=2 -fopenmp=libomp -MD -MT CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o -MF CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o.d -o CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o -c /home/frol/PROG/HydraRepos/HydraCore3/diff_render/integrator_dr.cpp

  1.  <eof> parser at end of file
    
  2.  Optimizer
    

#0 0x00007f5bb53ae6f6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:567:13
#1 0x00007f5bb53ac8e0 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:105:18
#2 0x00007f5bb52eba90 HandleCrash build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
#3 0x00007f5bb52eba90 CrashRecoverySignalHandler build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
#4 0x00007f5bb3c3c460 (/lib/x86_64-linux-gnu/libc.so.6+0x3c460)
#5 0x00007f5bb3c9152b __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007f5bb3c9152b __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#7 0x00007f5bb3c9152b pthread_kill ./nptl/pthread_kill.c:89:10
#8 0x00007f5bb3c3c3b6 raise ./signal/../sysdeps/posix/raise.c:27:6
#9 0x00007f5bb3c2287c abort ./stdlib/abort.c:81:7
#10 0x00007f5bb3c2279b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#11 0x00007f5bb3c33b66 (/lib/x86_64-linux-gnu/libc.so.6+0x33b66)
#12 0x00007f5bb0fcf596 ActivityAnalyzer::isInstructionInactiveFromOrigin(TypeResults const&, llvm::Value*, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0x7cf596)
#13 0x00007f5bb0fcbbcd ActivityAnalyzer::isConstantValue(TypeResults const&, llvm::Value*) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0x7cbbcd)
#14 0x00007f5bb1542a13 GradientUtils::forceActiveDetection() (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xd42a13)
#15 0x00007f5bb13b3ac4 EnzymeLogic::CreateAugmentedPrimal(RequestContext, llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::vector<bool, std::allocator>, bool, unsigned int, bool, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbb3ac4)
#16 0x00007f5bb1422ab5 AdjointGenerator<AugmentedReturn*>::recursivelyHandleSubfunction(llvm::CallInst&, llvm::Function*, std::vector<bool, std::allocator> const&, bool, DIFFE_TYPE, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc22ab5)
#17 0x00007f5bb141a0e4 AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc1a0e4)
#18 0x00007f5bb1417355 llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::delegateCallInst(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc17355)
#19 0x00007f5bb140195d llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::visitCall(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc0195d)
#20 0x00007f5bb1400e19 llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::visit(llvm::Instruction&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc00e19)
#21 0x00007f5bb13d7a6d llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::visit(llvm::Instruction*) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbd7a6d)
#22 0x00007f5bb13b4920 EnzymeLogic::CreateAugmentedPrimal(RequestContext, llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::vector<bool, std::allocator>, bool, unsigned int, bool, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbb4920)
#23 0x00007f5bb1422ab5 AdjointGenerator<AugmentedReturn*>::recursivelyHandleSubfunction(llvm::CallInst&, llvm::Function*, std::vector<bool, std::allocator> const&, bool, DIFFE_TYPE, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc22ab5)
#24 0x00007f5bb141a0e4 AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc1a0e4)
#25 0x00007f5bb1417355 llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::delegateCallInst(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc17355)
#26 0x00007f5bb140195d llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::visitCall(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc0195d)
#27 0x00007f5bb1400e19 llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::visit(llvm::Instruction&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc00e19)
#28 0x00007f5bb13d7a6d llvm::InstVisitor<AdjointGenerator<AugmentedReturn*>, void>::visit(llvm::Instruction*) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbd7a6d)
#29 0x00007f5bb13b4920 EnzymeLogic::CreateAugmentedPrimal(RequestContext, llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::vector<bool, std::allocator>, bool, unsigned int, bool, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbb4920)
#30 0x00007f5bb145a055 AdjointGenerator<AugmentedReturn const*>::recursivelyHandleSubfunction(llvm::CallInst&, llvm::Function*, std::vector<bool, std::allocator> const&, bool, DIFFE_TYPE, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc5a055)
#31 0x00007f5bb1451c94 AdjointGenerator<AugmentedReturn const*>::visitCallInst(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc51c94)
#32 0x00007f5bb144ef05 llvm::InstVisitor<AdjointGenerator<AugmentedReturn const*>, void>::delegateCallInst(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc4ef05)
#33 0x00007f5bb143a8ed llvm::InstVisitor<AdjointGenerator<AugmentedReturn const*>, void>::visitCall(llvm::CallInst&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc3a8ed)
#34 0x00007f5bb1439da9 llvm::InstVisitor<AdjointGenerator<AugmentedReturn const*>, void>::visit(llvm::Instruction&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xc39da9)
#35 0x00007f5bb13da08d llvm::InstVisitor<AdjointGenerator<AugmentedReturn const*>, void>::visit(llvm::Instruction*) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbda08d)
#36 0x00007f5bb13c1c23 EnzymeLogic::CreatePrimalAndGradient(RequestContext, ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xbc1c23)
#37 0x00007f5bb13552b9 (anonymous namespace)::EnzymeBase::HandleAutoDiff(llvm::Instruction*, unsigned int, llvm::Value*, llvm::Type*, llvm::SmallVectorImplllvm::Value*&, std::map<int, llvm::Type*, std::less, std::allocator<std::pair<int const, llvm::Type*>>> const&, std::vector<DIFFE_TYPE, std::allocator<DIFFE_TYPE>> const&, llvm::Function*, DerivativeMode, (anonymous namespace)::EnzymeBase::Options&, bool, llvm::SmallVectorImplllvm::CallInst*&) Enzyme.cpp:0:0
#38 0x00007f5bb134ec0c (anonymous namespace)::EnzymeBase::HandleAutoDiffArguments(llvm::CallInst*, DerivativeMode, bool, llvm::SmallVectorImplllvm::CallInst*&) Enzyme.cpp:0:0
#39 0x00007f5bb134dbda (anonymous namespace)::EnzymeBase::lowerEnzymeCalls(llvm::Function&, std::set<llvm::Function*, std::lessllvm::Function*, std::allocatorllvm::Function*>&) Enzyme.cpp:0:0
#40 0x00007f5bb1348daa (anonymous namespace)::EnzymeBase::run(llvm::Module&) Enzyme.cpp:0:0
#41 0x00007f5bb13969b0 EnzymeNewPM::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xb969b0)
#42 0x00007f5bb13968d4 llvm::detail::PassModel<llvm::Module, EnzymeNewPM, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/home/frol/PROG/enzyme_main/enzyme/build/Enzyme/ClangEnzyme-16.so+0xb968d4)
#43 0x00007f5bb5517c99 runAfterPass<llvm::Module, llvm::detail::PassConcept<llvm::Module, llvm::AnalysisManagerllvm::Module > > build-llvm/tools/clang/stage2-bins/llvm/include/llvm/IR/PassInstrumentation.h:256:9
#44 0x00007f5bb5517c99 llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) build-llvm/tools/clang/stage2-bins/llvm/include/llvm/IR/PassManager.h:521:10
#45 0x00007f5bbd4ecd20 isSmall build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/SmallPtrSet.h:195:33
#46 0x00007f5bbd4ecd20 ~SmallPtrSetImplBase build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/SmallPtrSet.h:83:10
#47 0x00007f5bbd4ecd20 ~PreservedAnalyses build-llvm/tools/clang/stage2-bins/llvm/include/llvm/IR/PassManager.h:152:7
#48 0x00007f5bbd4ecd20 RunOptimizationPipeline build-llvm/tools/clang/stage2-bins/clang/lib/CodeGen/BackendUtil.cpp:1049:5
#49 0x00007f5bbd4e46c5 EmitAssembly build-llvm/tools/clang/stage2-bins/clang/lib/CodeGen/BackendUtil.cpp:0:3
#50 0x00007f5bbd4e46c5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream>) build-llvm/tools/clang/stage2-bins/clang/lib/CodeGen/BackendUtil.cpp:1268:13
#51 0x00007f5bbd8419bf unique_ptr /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:395:6
#52 0x00007f5bbd8419bf HandleTranslationUnit build-llvm/tools/clang/stage2-bins/clang/lib/CodeGen/CodeGenAction.cpp:382:7
#53 0x00007f5bbe227aac operator++ /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_iterator.h:1107:2
#54 0x00007f5bbe227aac clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) build-llvm/tools/clang/stage2-bins/clang/lib/Frontend/MultiplexConsumer.cpp:297:23
#55 0x00007f5bbc5cf752 __normal_iterator /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20
#56 0x00007f5bbc5cf752 begin /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:869:16
#57 0x00007f5bbc5cf752 finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_deleteclang::TemplateInstantiationCallback >, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_deleteclang::TemplateInstantiationCallback > > > > build-llvm/tools/clang/stage2-bins/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#58 0x00007f5bbc5cf752 clang::ParseAST(clang::Sema&, bool, bool) build-llvm/tools/clang/stage2-bins/clang/lib/Parse/ParseAST.cpp:203:3
#59 0x00007f5bbe1ed825 clang::FrontendAction::Execute() build-llvm/tools/clang/stage2-bins/clang/lib/Frontend/FrontendAction.cpp:1062:10
#60 0x00007f5bbe167d54 getPtr build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/Error.h:275:12
#61 0x00007f5bbe167d54 operator bool build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/Error.h:235:16
#62 0x00007f5bbe167d54 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) build-llvm/tools/clang/stage2-bins/clang/lib/Frontend/CompilerInstance.cpp:1046:23
#63 0x00007f5bbe266b04 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) build-llvm/tools/clang/stage2-bins/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:264:25
#64 0x00005560e773bfb6 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) build-llvm/tools/clang/stage2-bins/clang/tools/driver/cc1_main.cpp:251:15
#65 0x00005560e77390f0 ExecuteCC1Tool build-llvm/tools/clang/stage2-bins/clang/tools/driver/driver.cpp:360:12
#66 0x00007f5bbde43b62 operator() build-llvm/tools/clang/stage2-bins/clang/lib/Driver/Job.cpp:428:30
#67 0x00007f5bbde43b62 callback_fn<(lambda at clang/lib/Driver/Job.cpp:428:22)> build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#68 0x00007f5bb52eb82c operator() build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
#69 0x00007f5bb52eb82c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
#70 0x00007f5bbde43263 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optionalllvm::StringRef>, std::__cxx11::basic_string<char, std::char_traits, std::allocator>, bool) const build-llvm/tools/clang/stage2-bins/clang/lib/Driver/Job.cpp:428:7
#71 0x00007f5bbde0e4e2 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const build-llvm/tools/clang/stage2-bins/clang/lib/Driver/Compilation.cpp:199:15
#72 0x00007f5bbde0e73e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const build-llvm/tools/clang/stage2-bins/clang/lib/Driver/Compilation.cpp:253:13
#73 0x00007f5bbde28e2d empty build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/SmallVector.h:94:46
#74 0x00007f5bbde28e2d clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) build-llvm/tools/clang/stage2-bins/clang/lib/Driver/Driver.cpp:1856:23
#75 0x00005560e7738875 clang_main(int, char**) build-llvm/tools/clang/stage2-bins/clang/tools/driver/driver.cpp:562:21
#76 0x00007f5bb3c23a90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#77 0x00007f5bb3c23b49 call_init ./csu/../csu/libc-start.c:128:20
#78 0x00007f5bb3c23b49 __libc_start_main ./csu/../csu/libc-start.c:347:5
#79 0x00005560e7735705 _start (/usr/bin/clang++-16+0xe705)
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Ubuntu clang version 16.0.0 (1
exp5ubuntu3)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/integrator_dr-664fbe.cpp
clang: note: diagnostic msg: /tmp/integrator_dr-664fbe.sh
clang: note: diagnostic msg:


make[2]: *** [CMakeFiles/hydra.dir/build.make:90: CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:129: CMakeFiles/hydra.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

  • The terminal process "/usr/bin/bash '-c', 'cd cmake-build-release && make -j 8'" terminated with exit code: 2.
  • Terminal will be reused by tasks, press any key to close it.

@FROL256
Copy link
Author

FROL256 commented Jan 17, 2024

The txt file with message is also in the archive on google disk https://drive.google.com/file/d/1NbskYqtnwYr1u4n_sppsGNw-Q8YVkrhy/view?usp=sharing

Its definitely compile time

@wsmoses
Copy link
Member

wsmoses commented Feb 12, 2024

@FROL256 I tried setting up your repo to debug, but it looks like it wasn't committed to the repo?

wmoses@beast:~/git/Enzyme/enzyme/build17/HydraCore3/build (ad_bug) $ cmake ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Debug is OFF!
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done (1.0s)
CMake Error at CMakeLists.txt:182 (add_executable):
  Cannot find source file:

    external/LiteScene/pugixml.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at CMakeLists.txt:182 (add_executable):
  No SOURCES given to target: hydra

@FROL256
Copy link
Author

FROL256 commented Feb 12, 2024

srry, forgot about that:

git submodule init
git submodule update

@wsmoses
Copy link
Member

wsmoses commented Feb 12, 2024

@FROL256 so I retried your codebase on the lastest main and it appears to compile successfully.

I don't have the file you need but otherwise it seems fine?

wmoses@beast:~/git/Enzyme/enzyme/build17/HydraCore3/build (ad_bug) $ LD_LIBRARY_PATH="/home/wmoses/llvms/llvm16/buildD/lib" /home/wmoses/git/Enzyme/enzyme/build17/HydraCore3/bin-release/hydra --help
[drmain]: loading xml ... ../resources/HydraCore/hydra_app/tests/test_42/statex_00001.xml
HydraScene ERROR: Error loading scene from: ../resources/HydraCore/hydra_app/tests/test_42/statex_00001.xml
HydraScene ERROR: File was not found

@FROL256
Copy link
Author

FROL256 commented Feb 13, 2024

Yep, this is because i have disabled all materials except Lambert in main branch.
Just need to have some-thing which works in main.

Please consider those two branches:

  • ad_bug
  • ad_bug_simpler

You can clone target branch with sub-modules in this way:
git clone --recursive -b ad_bug https://github.com/Ray-Tracing-Systems/HydraCore3.git

@wsmoses
Copy link
Member

wsmoses commented Feb 13, 2024

So I am on the ad_bug branch (my terminal shows the branch before the $ token) and it worked fine.

Can you rerun and confirm what error message you see?

Specifically I was on

wmoses@beast:~/git/Enzyme/enzyme/build17/HydraCore3 (ad_bug) $ git log
commit 8c31bec340c39920ad69e82d0f781a35fccfd54c (HEAD -> ad_bug, origin/ad_bug)
Author: Vladimir Frolov <vladimir.frolov@graphics.cs.msu.ru>
Date:   Wed Jan 17 16:25:56 2024 +0300

    for enzyme bugreport

commit 445148007c9cd5b51a1af9fb8b566f7957ca2fc7
Author: Vladimir Frolov <vladimir.frolov@graphics.cs.msu.ru>
Date:   Wed Jan 17 14:50:16 2024 +0300

    edit

commit 9303979a2b10f48eeb0fb823effffebee7808f9d
Author: Vladimir Frolov <vladimir.frolov@graphics.cs.msu.ru>

@FROL256
Copy link
Author

FROL256 commented Feb 13, 2024

Ok, so i have made some updates. It seems enzyme_101 AD behaves much better.
But still have a problem in compile time.
Currently it is "Illegal orIn: Integer right: Float@float PointerIntSame=0"
I didn't yet figured out what exacly gives me this error.

Here is the full way to reproduce the bug from scratch:

  1. clone (branch 'ad_bug3')
  1. Please verify you have set correct path in Cmake to enzyme .so
  • set(ENZYME_PLUGIN_DLL "/home/frol/PROG/enzyme_101/build/Enzyme/ClangEnzyme-${CLANG_VERSION}.so")
  1. Build (please enzure you have enabled Enzyme in project via '-DUSE_ENZYME=ON')
  • cd HydraCore3
  • mkdir build && cd build
  • export CC=/usr/bin/clang-17
  • export CXX=/usr/bin/clang++-17
  • cmake -DCMAKE_BUILD_TYPE=Release -DUSE_ENZYME=ON -DCLANG_VERSION=17 ..
  • make -j 10
  1. Here is the output:

Illegal orIn: Integer right: Float@float PointerIntSame=0
clang++-17: /home/frol/PROG/enzyme_101/Enzyme/TypeAnalysis/../TypeAnalysis/ConcreteType.h:241: bool ConcreteType::orIn(ConcreteType, bool): Assertion `0 && "Performed illegal ConcreteType::orIn"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/clang++-17 -DUSE_ENZYME -D_CRT_SECURE_NO_WARNINGS -I/home/frol/PROG/test_enzyme_bug/HydraCore3 -I/home/frol/PROG/test_enzyme_bug/HydraCore3/external -I/home/frol/PROG/test_enzyme_bug/HydraCore3/external/vkutils -I/home/frol/PROG/test_enzyme_bug/HydraCore3/external/CrossRT -isystem /home/frol/PROG/test_enzyme_bug/HydraCore3/external/tinyexr -isystem /home/frol/PROG/test_enzyme_bug/HydraCore3/external/volk -isystem /home/frol/PROG/test_enzyme_bug/HydraCore3/external/LiteMath -O3 -DNDEBUG "-fopenmp=libomp " -fplugin=/home/frol/PROG/enzyme_101/build/Enzyme/ClangEnzyme-17.so -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wno-sign-conversion -Wno-useless-cast -Wno-unused-parameter -Wno-unknown-attributes -Wnull-dereference -Wdouble-promotion -Wformat=2 -fopenmp=libomp -MD -MT CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o -MF CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o.d -o CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o -c /home/frol/PROG/test_enzyme_bug/HydraCore3/diff_render/integrator_dr.cpp

  1. parser at end of file
  2. Optimizer
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it):
    0 libLLVM-17.so.1 0x00007f5915acc406 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 54
    1 libLLVM-17.so.1 0x00007f5915aca5b0 llvm::sys::RunSignalHandlers() + 80
    2 libLLVM-17.so.1 0x00007f5915a20d70
    3 libc.so.6 0x00007f5914642520
    4 libc.so.6 0x00007f59146969fc pthread_kill + 300
    5 libc.so.6 0x00007f5914642476 raise + 22
    6 libc.so.6 0x00007f59146287f3 abort + 211
    7 libc.so.6 0x00007f591462871b
    8 libc.so.6 0x00007f5914639e96
    9 ClangEnzyme-17.so 0x00007f5911bce9cb ConcreteType::orIn(ConcreteType, bool) + 367
    10 ClangEnzyme-17.so 0x00007f591207b320 TypeResults::intType(unsigned long, llvm::Value*, bool, bool) const + 716
    11 ClangEnzyme-17.so 0x00007f5911e73c4b AdjointGenerator::visitBinaryOperator(llvm::BinaryOperator&) + 301
    12 ClangEnzyme-17.so 0x00007f5911ebf1ff llvm::InstVisitor<AdjointGenerator, void>::visitOr(llvm::BinaryOperator&) + 39
    13 ClangEnzyme-17.so 0x00007f5911eb136b llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction&) + 793
    14 ClangEnzyme-17.so 0x00007f5911e9faa7 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction*) + 39
    15 ClangEnzyme-17.so 0x00007f5911e4c500 EnzymeLogic::CreateAugmentedPrimal(RequestContext, llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::vector<bool, std::allocator>, bool, unsigned int, bool, bool) + 21696
    16 ClangEnzyme-17.so 0x00007f5911e89436 AdjointGenerator::recursivelyHandleSubfunction(llvm::CallInst&, llvm::Function*, std::vector<bool, std::allocator> const&, bool, DIFFE_TYPE, bool) + 15320
    17 ClangEnzyme-17.so 0x00007f5911e90c98 AdjointGenerator::visitCallInst(llvm::CallInst&) + 10886
    18 ClangEnzyme-17.so 0x00007f5911ecd025 llvm::InstVisitor<AdjointGenerator, void>::delegateCallInst(llvm::CallInst&) + 505
    19 ClangEnzyme-17.so 0x00007f5911ebf66d llvm::InstVisitor<AdjointGenerator, void>::visitCall(llvm::CallInst&) + 39
    20 ClangEnzyme-17.so 0x00007f5911eb15f3 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction&) + 1441
    21 ClangEnzyme-17.so 0x00007f5911e9faa7 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction*) + 39
    22 ClangEnzyme-17.so 0x00007f5911e4c500 EnzymeLogic::CreateAugmentedPrimal(RequestContext, llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::vector<bool, std::allocator>, bool, unsigned int, bool, bool) + 21696
    23 ClangEnzyme-17.so 0x00007f5911e89436 AdjointGenerator::recursivelyHandleSubfunction(llvm::CallInst&, llvm::Function*, std::vector<bool, std::allocator> const&, bool, DIFFE_TYPE, bool) + 15320
    24 ClangEnzyme-17.so 0x00007f5911e90c98 AdjointGenerator::visitCallInst(llvm::CallInst&) + 10886
    25 ClangEnzyme-17.so 0x00007f5911ecd025 llvm::InstVisitor<AdjointGenerator, void>::delegateCallInst(llvm::CallInst&) + 505
    26 ClangEnzyme-17.so 0x00007f5911ebf66d llvm::InstVisitor<AdjointGenerator, void>::visitCall(llvm::CallInst&) + 39
    27 ClangEnzyme-17.so 0x00007f5911eb15f3 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction&) + 1441
    28 ClangEnzyme-17.so 0x00007f5911e9faa7 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction*) + 39
    29 ClangEnzyme-17.so 0x00007f5911e4c500 EnzymeLogic::CreateAugmentedPrimal(RequestContext, llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::vector<bool, std::allocator>, bool, unsigned int, bool, bool) + 21696
    30 ClangEnzyme-17.so 0x00007f5911e89436 AdjointGenerator::recursivelyHandleSubfunction(llvm::CallInst&, llvm::Function*, std::vector<bool, std::allocator> const&, bool, DIFFE_TYPE, bool) + 15320
    31 ClangEnzyme-17.so 0x00007f5911e90c98 AdjointGenerator::visitCallInst(llvm::CallInst&) + 10886
    32 ClangEnzyme-17.so 0x00007f5911ecd025 llvm::InstVisitor<AdjointGenerator, void>::delegateCallInst(llvm::CallInst&) + 505
    33 ClangEnzyme-17.so 0x00007f5911ebf66d llvm::InstVisitor<AdjointGenerator, void>::visitCall(llvm::CallInst&) + 39
    34 ClangEnzyme-17.so 0x00007f5911eb15f3 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction&) + 1441
    35 ClangEnzyme-17.so 0x00007f5911e9faa7 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction*) + 39
    36 ClangEnzyme-17.so 0x00007f5911e59346 EnzymeLogic::CreatePrimalAndGradient(RequestContext, ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) + 19912
    37 ClangEnzyme-17.so 0x00007f5911ddb2a2
    38 ClangEnzyme-17.so 0x00007f5911ddcea4
    39 ClangEnzyme-17.so 0x00007f5911de189f
    40 ClangEnzyme-17.so 0x00007f5911de3172
    41 ClangEnzyme-17.so 0x00007f5911deb5a6 EnzymeNewPM::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) + 62
    42 ClangEnzyme-17.so 0x00007f5911e3178f llvm::detail::PassModel<llvm::Module, EnzymeNewPM, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) + 71
    43 libLLVM-17.so.1 0x00007f5915c3f224 llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) + 276
    44 libclang-cpp.so.17 0x00007f591dfe9a25
    45 libclang-cpp.so.17 0x00007f591dfe2b28 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtrllvm::vfs::FileSystem, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream>) + 6648
    46 libclang-cpp.so.17 0x00007f591e36b98e
    47 libclang-cpp.so.17 0x00007f591ed91e4c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 44
    48 libclang-cpp.so.17 0x00007f591d037816 clang::ParseAST(clang::Sema&, bool, bool) + 614
    49 libclang-cpp.so.17 0x00007f591ed570c5 clang::FrontendAction::Execute() + 85
    50 libclang-cpp.so.17 0x00007f591ecd26c4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 708
    51 libclang-cpp.so.17 0x00007f591edd0e84 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 660
    52 clang++-17 0x00005617a52e6856 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2454
    53 clang++-17 0x00005617a52e43c5
    54 libclang-cpp.so.17 0x00007f591e994c59
    55 libLLVM-17.so.1 0x00007f5915a20b0c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 140
    56 libclang-cpp.so.17 0x00007f591e99449e clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optionalllvm::StringRef>, std::__cxx11::basic_string<char, std::char_traits, std::allocator>, bool) const + 366
    57 libclang-cpp.so.17 0x00007f591e95d40d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 877
    58 libclang-cpp.so.17 0x00007f591e95d66e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const + 142
    59 libclang-cpp.so.17 0x00007f591e9791ed clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) + 349
    60 clang++-17 0x00005617a52e3d2d clang_main(int, char**, llvm::ToolContext const&) + 11229
    61 clang++-17 0x00005617a52f0562 main + 50
    62 libc.so.6 0x00007f5914629d90
    63 libc.so.6 0x00007f5914629e40 __libc_start_main + 128
    64 clang++-17 0x00005617a52e0df5 _start + 37
    clang++-17: error: clang frontend command failed with exit code 134 (use -v to see invocation)
    Ubuntu clang version 17.0.6 (++20231209124227+6009708b4367-1exp120231209124336.77)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
    clang++-17: note: diagnostic msg:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++-17: note: diagnostic msg: /tmp/integrator_dr-11c34a.cpp
clang++-17: note: diagnostic msg: /tmp/integrator_dr-11c34a.sh
clang++-17: note: diagnostic msg:


make[2]: *** [CMakeFiles/hydra.dir/build.make:90: CMakeFiles/hydra.dir/diff_render/integrator_dr.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:129: CMakeFiles/hydra.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

@FROL256
Copy link
Author

FROL256 commented Feb 13, 2024

If there is something in my code which is unsupported and cause 'Illegal orIn: Integer right: Float@float PointerIntSame=0', could you please give me and advice what i have to seek for. I'll try to remove it. Thanks!

@FROL256
Copy link
Author

FROL256 commented Feb 21, 2024

@wsmoses , do you have any ideas about 'Illegal orIn: Integer right: Float@float PointerIntSame=0' ? ) thx )

@FROL256
Copy link
Author

FROL256 commented Mar 23, 2024

I have finally restructured my code by making less nesting and less in-out parameters, and on v103 it works.

@FROL256 FROL256 closed this as completed Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants