Comments (6)
In general, you can query Local#getUsers(LocalUse::Type::WRITER)
to get all writers.
If there is just one writer, Local#getSingleWriter()
will do the trick. Also if you have a Value
instead of the local, you can call Value#getSingleWriter()
which does the same, but checks whether the value is a local. Of course the result needs to be checked for nullptr
in both cases!
from vc4c.
There is already some related code there. This was added some while ago to do a similar job, but I am not sure whether it is still applied. Anyway, that might be a good point to start.
from vc4c.
@doe300 I have a question. Is there a way to find the instruction corresponded the local (for example, I want to get the instruction %sub1 = sub i32 %mul, %width
from the value i32 %sub1
). Or should I create this method?
%mul = mul nsw i32 %y.024, %width
%sub1 = sub i32 %mul, %width
%add = add i32 %mul, %width
%call = tail call spir_func <16 x i8> @_Z7vload16jPU3AS1Kh(i32 %sub1, i8 addrspace(1)* %in) #2
%call2 = tail call spir_func <16 x i8> @_Z7vload16jPU3AS1Kh(i32 %mul, i8 addrspace(1)* %in) #2
%call3 = tail call spir_func <16 x i8> @_Z7vload16jPU3AS1Kh(i32 %add, i8 addrspace(1)* %in) #2
from vc4c.
@doe300 I want to insert the instruction (extends IntermediateInstruction
) which do VPM load here, but I cannot find it.
Is there such the instruction, or should I create the instruction?
from vc4c.
The general memory access (before we know whether the memory area is lowered to a register, the VPM or accessed via TMU or DMA) is represented as MemoryInstruction
.
After the lowering, there are no specific instruction types for the various lowered types (e.g. register, VPM), instead the MemoryInstruction
is directly composed to the (hardware) instructions executed to do the memory accesses.
So if you want to insert a VPM access, have a look at the VPM header:
insertReadDMA
,insertWriteDMA
for "direct" DMA access (QPU <-> RAM), abstracting away the VPMVPM::insertReadVPM
,VPM::insertWriteVPM
for VPM access (QPU <-> VPM), e.g. also for caching/exchanging data between QPUsVPM::insertReadRAM
,VPM::insertWriteRAM
for DMA only access (VPM <-> RAM), e.g. to read/write back cached data
The VPM object required can be retrieved via the Method::vpm
member.
Does this information suffice or do you need a special instruction type to represent VPM accesses (e.g. for further processing)?
from vc4c.
I understand, thanks.
from vc4c.
Related Issues (20)
- Segmentation fault with uchar16 and `-O3`
- Generating invalid code about vector rotation. HOT 3
- Running Tensorflow model via TVM on OpenCL HOT 6
- Compilation Failure on Arch Linux & distcc HOT 15
- ‘LOGGER’ is not a member of ‘logging’ HOT 2
- cpack -G DEB "error" HOT 1
- Build fails on clean Pi HOT 11
- Compilation Error: Normalizer: Lowering copy with more than 1 entry is not yet implemented HOT 3
- many errors linking in vc4clStdLib HOT 6
- Compile failure with Clang/LLVM 11 HOT 2
- compile failure with clang6.0 llvm-6.0 HOT 8
- Build fail on Raspbian 10 HOT 2
- c++: fatal error: Killed signal terminated program cc1plus HOT 3
- Build Error HOT 4
- Compilation error HOT 5
- Compilation error
- VC4C build error in the current branch HOT 1
- RPI 3A+ VC4C Build error HOT 8
- VC4C build error (make compile error) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vc4c.