search for: kaleidoscopejit

Displaying 20 results from an estimated 29 matches for "kaleidoscopejit".

2020 Mar 01
2
LLVM version for KaleidoscopeJIT
Hi, I have been following the KaleidoscopeJIT chapters and I have found that the code might not be up to date with the current LLVM version. Is anyone aware of the supported versions of LLVM? Best, Anshil -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/2...
2019 Sep 23
4
"Freeing" functions generated with SimpleORC for JIT use-case
...the modules after some time and reclaim any memory associated with it. I am using the SimpleORC API <https://llvm.org/docs/tutorial/BuildingAJIT1.html> now. Is there an API to "free" all the memory associated with the module? I use one "compiler" instance (think similar to KaleidoscopeJIT class with its ExecutionSession, CompileLayer etc.) in my process. Is there an API to reset all memory used? Does deleting the "KaleidoscopeJIT" class ensure all memory is reclaimed? In that case i can periodically re-create that class to achieve what i want. Thanks! Rajesh S R -------...
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
...it is at least not required for showing the improved body of "test" - "createBasicAliasAnalysisPass" does not exist anymore (llvm-3.9.1). Also requires adaption of the text 4.4. Adding a JIT Compiler - Code for main: - "TheJIT = llvm::make_unique<KaleidoscopeJIT>();" will cause a crash due to an invalid read in "Datalayout::operator=" as "EngineBuilder().selectTarget()" returns a nullptr when "InitializeNativeTarget" has not been called yet. Other problems occur if the other InitializeNative* fu...
2019 Mar 26
2
ORC JIT fails with standard math librrary
Hi, I still can't get IR functions to JIT compile with the ORC JIT when they contain a call to the standard math library. Attached is a minimal exploit. The program uses the KaleidoscopeJIT.h that ships with LLVM 8 (except that I had to expose the Datalayout). It reads from the filesystem an IR file (filename "func_works.ll" or "func_cos_fails.ll) and asks the ORC JIT first for the symbol "func_ir" and then for the address. In case the file "func_work...
2016 Oct 28
4
MCJit and remove module memory leak?
I'm on llvm 3.8.1 and was wondering if there's a memory leak in the removeModule impl of mcjit. In the tutorial http://llvm.org/releases/3.8.1/docs/tutorial/LangImpl4.html a module is removed from the Jit by invoking removeModule. According to the tutorial: "Its API is very simple:: addModule adds an LLVM IR module to the JIT, making its functions available for execution;
2016 Nov 16
2
MCJit and remove module memory leak?
...n P. Neal via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> On Fri, Nov 04, 2016 at 04:20:32PM -0700, Lang Hames via llvm-dev wrote: >> > Hi Koffie, >> > Kaleidoscope is no longer using MCJIT - it has been moved over to the >> > ORC-based KaleidoscopeJIT class (see >> > llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h). The >> removeModule >> > method there does not leak memory. >> > I've added documentation in r286026 to describe MCJIT removeModule's >> > crazy ownership contract. &...
2017 Nov 14
1
OrcJIT + CUDA Prototype for Cling
...bjectTransformLayer between > your CompileLayer and LinkingLayer so that you can capture the object > files as they're generated. Then you can inspect the object files > being generated by the compiler to see what might be wrong with them. > > Something like this: > > class KaleidoscopeJIT { > private: > >   using ObjectPtr = > std::shared_ptr<object::OwningBinary<object::ObjectFile>>; > >   static ObjectPtr dumpObject(ObjectPtr Obj) { >     SmallVector<char, 256> UniqueObjFileName; >     sys::fs::createUniqueFile("jit-object-%%%.o"...
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
...uot;llvm/Support/DynamicLibrary.h" #include "llvm/Support/TargetSelect.h" #include <iostream> using namespace llvm; using namespace llvm::orc; /** This class taken verbatim from * https://github.com/llvm-mirror/llvm/blob/release_40/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h * This is from the same revision of LLVM I am using (the release_40 branch as of 4/8/2017) */ class KaleidoscopeJIT { private: std::unique_ptr<TargetMachine> TM; const DataLayout DL; ObjectLinkingLayer<> ObjectLayer; IRCompileLayer<decltype(ObjectLayer)> Compil...
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
...getSelect.h" >> #include <iostream> >> >> using namespace llvm; >> using namespace llvm::orc; >> >> /** This class taken verbatim from >> * https://github.com/llvm-mirror/llvm/blob/release_40/examples >> /Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h >> * This is from the same revision of LLVM I am using (the release_40 >> branch as of 4/8/2017) >> */ >> class KaleidoscopeJIT { >> private: >> std::unique_ptr<TargetMachine> TM; >> const DataLayout DL; >> ObjectLinkingLayer<...
2019 Sep 25
4
Questions after playing around with KaleidoscopeJIT (With source files)
Hello LLVM people, after finishing Chapter 1 and 2 of the KaleidoscopeJIT tutorial, I started to play around with the code and now, I have even more questions than before. I hope that the people reading this could help me with it, to improve my understanding about the LLVM and the JIT. I have also the source code and binaries (Windows) available but because I don't k...
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
...;>>> >>>> using namespace llvm; >>>> using namespace llvm::orc; >>>> >>>> /** This class taken verbatim from >>>> * https://github.com/llvm-mirror/llvm/blob/release_40/examples >>>> /Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h >>>> * This is from the same revision of LLVM I am using (the release_40 >>>> branch as of 4/8/2017) >>>> */ >>>> class KaleidoscopeJIT { >>>> private: >>>> std::unique_ptr<TargetMachine> TM; >>>>...
2019 Aug 10
3
ORC v2 question
...problems. I am using LLVM 8.0.1. I updated my ORC v1 implementation from 6.0 to 8.0 based on Kaleidoscope example (i.e. using Legacy classes) and that works fine. Now I am trying out ORC v2 apis, based on https://github.com/llvm-mirror/llvm/blob/master/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h. I have got it to compile and build. But looks like my compiled code is not being optimized at all. For optimization I am using the PassManagerBuilder class to setup the passes. I use OptLevel = 2. This works perfectly with ORC v1 apis, but with ORC v2 I am not sure what is happening. I can see...
2017 May 01
1
Possible stack corruption during call to JITSymbol::getAddress()
...espace llvm; >>>>>> using namespace llvm::orc; >>>>>> >>>>>> /** This class taken verbatim from >>>>>> * https://github.com/llvm-mirror/llvm/blob/release_40/examples >>>>>> /Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h >>>>>> * This is from the same revision of LLVM I am using (the release_40 >>>>>> branch as of 4/8/2017) >>>>>> */ >>>>>> class KaleidoscopeJIT { >>>>>> private: >>>>>> std::unique_pt...
2017 Sep 27
2
OrcJIT + CUDA Prototype for Cling
Dear LLVM-Developers and Vinod Grover, we are trying to extend the cling C++ interpreter (https://github.com/root-project/cling) with CUDA functionality for Nvidia GPUs. I already developed a prototype based on OrcJIT and am seeking for feedback. I am currently a stuck with a runtime issue, on which my interpreter prototype fails to execute kernels with a CUDA runtime error. === How to use the
2018 Jun 28
3
Since MCJIT I can't get libm functions to work
I am upgrading our JIT application to use LLVM 6.0.0, and with this transition I am making the move to use the new MCJIT facility. A problem I am encountering is that the math functions from libm are not resolved/found. I am using the lambda resolver from the KaleidoscopeJIT class which first searches the present modules and, if that is unsuccessful, continues the search in the whole process space. The generated modules would declare external functions like declare float @cosf(float) and would call it like:   %17 = call float @cosf(float %16) The datalayout is...
2019 Jun 28
2
JIT crashing when compiling source code with Clang and -mretpoline flag
Heyho both Mailinglists, I'm not sure if I encountered a bug or if I'm doing something wrong. I compiled a "Hello World"-function with Clang to LLVM-IR code, while passing the "-mretpoline" flag. I tried jitting and calling that function with the KaleidoscopeJIT code, but when calling "lookup" for that function the application crashed. I also tried that file in an old MCJIT implementation I had - there the application crashed when calling the function (but it does find the address for the function first). If I recompile my code without the &quot...
2019 Aug 10
2
ORC v2 question
...updated my ORC v1 implementation from 6.0 to 8.0 based on >> Kaleidoscope example (i.e. using Legacy classes) and that works fine. >> >> Now I am trying out ORC v2 apis, based on >> https://github.com/llvm-mirror/llvm/blob/master/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h. >> >> I have got it to compile and build. >> But looks like my compiled code is not being optimized at all. >> >> For optimization I am using the PassManagerBuilder class to setup the >> passes. I use OptLevel = 2. This works perfectly with ORC v1 apis, but &g...
2017 Sep 25
1
Some questions regarding ORC JIT apis
...... even though the function is defined as > having ExternalLinkage. I have to test on Linux / Mac OSX to see if > the behaviour is different there. Correct. There's a comment on it in the Kaleidoscope example: https://github.com/llvm-mirror/llvm/blob/master/examples/Kaleidoscope/include/KaleidoscopeJIT.h#L93 Cheers Stefan Am 24.09.17 um 00:36 schrieb Dibyendu Majumdar via llvm-dev: > Hi, > > On 22 September 2017 at 15:33, Dibyendu Majumdar <mobile at majumdar.org.uk> wrote: >> I am looking to port my MCJIT based implementation to ORC. I have been >> reading up on the...
2018 Jun 28
2
Since MCJIT I can't get libm functions to work
...te: >> >> I am upgrading our JIT application to use LLVM 6.0.0, and with this transition I am making the move to use the new MCJIT facility. >> >> A problem I am encountering is that the math functions from libm are not resolved/found. I am using the lambda resolver from the KaleidoscopeJIT class which first searches the present modules and, if that is unsuccessful, continues the search in the whole process space. >> >> The generated modules would declare external functions like >> >> declare float @cosf(float) >> >> and would call it like: >>...
2017 Nov 06
3
ORC JIT and multithreading