-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[LLVM] Make changes needed for opaque pointers #9138
Conversation
- Pass value type to all Create.*Load and Create.*GEP functions. - Create type TypedPointer to keep both the address and the pointee's type when buffer pointers etc. are created. - Eliminate calls to getPointerElementType, except one in creating debug info (that seems necessary for the time being).
Changes over all make sense, is this to prep for another change? was confused about "opaque pointer" |
LLVM IR is eliminating types in pointers, so there will only be This is an ongoing change in LLVM, but it's a pervasive one with a lot of impact on downstream consumers. Edit: Link to a document about this effort: |
More changes related to that will be needed, and I'm planning to keep making them as the LLVM IR evolves. |
Ah I didn't know about this, is this fallout related to the semantic changes in the IR? I'll check out the docs as well. LGTM thanks for educating me on this one. |
Since memory in LLVM is generally untyped, specific data types are provided at the time of accessing the memory, or computing addresses. For example The fallout comes from the fact that many functions in LLVM now need the extra type information passed to them. This mostly applies to the IR builder functions, but any code using LLVM may be subject to changes, if it relied on getting pointee type information from the pointer type itself. |
* main: Fix flaky NMS test by making sure scores are unique (apache#9140) [Relay] Merge analysis/context_analysis.cc and transforms/device_annotation.cc (apache#9038) [LLVM] Make changes needed for opaque pointers (apache#9138) Arm(R) Ethos(TM)-U NPU codegen integration (apache#8849) [CI] Split Integration tests out of first phase of pipeline (apache#9128) [Meta Schedule][M3b] Runner (apache#9111) Fix Google Mock differences between Ubuntu 18.04 and 16.04 (apache#9141) [TIR] add loop partition hint pragma (apache#9121) fix things (apache#9146) [Meta Schedule][M3a] SearchStrategy (apache#9132) [Frontend][PyTorch] support for quantized conv_transpose2d op (apache#9133) [UnitTest] Parametrized test_conv2d_int8_intrinsics (apache#9143) [OpenCL] Remove redundant visit statement in CodeGen. (apache#9144) [BYOC] support arbitrary input dims for add/mul/relu of dnnl c_src codegen (apache#9127) [Relay][ConvertLayout] Support for qnn.conv2d_transpose (apache#9139) add nn.global_avgpool to fq2i (apache#9137) [UnitTests] Enable minimum testing on Vulkan target in CI (apache#9093) [Torch] Support returning quantized weights and bias for BYOC use cases (apache#9135) [Relay] Prepare for new plan_devices.cc (part II) (apache#9130) [microTVM][Zephyr] Add MIMXRT1050 board support (apache#9068)
* main: (80 commits) Introduce centralised name transformation functions (apache#9088) [OpenCL] Add vectorization to cuda conv2d_nhwc schedule (apache#8636) [6/6] Arm(R) Ethos(TM)-U NPU codegen integration with `tvmc` (apache#8854) [microTVM] Add wrapper for creating project using a MLF (apache#9090) Fix typo (apache#9156) [Hotfix][Testing] Wait for RPCServer to be established (apache#9150) Update find cublas so it search default path if needed. (apache#9149) [TIR][LowerMatchBuffer] Fix lowering strides when source region has higher dimension than the buffer (apache#9145) Fix flaky NMS test by making sure scores are unique (apache#9140) [Relay] Merge analysis/context_analysis.cc and transforms/device_annotation.cc (apache#9038) [LLVM] Make changes needed for opaque pointers (apache#9138) Arm(R) Ethos(TM)-U NPU codegen integration (apache#8849) [CI] Split Integration tests out of first phase of pipeline (apache#9128) [Meta Schedule][M3b] Runner (apache#9111) Fix Google Mock differences between Ubuntu 18.04 and 16.04 (apache#9141) [TIR] add loop partition hint pragma (apache#9121) fix things (apache#9146) [Meta Schedule][M3a] SearchStrategy (apache#9132) [Frontend][PyTorch] support for quantized conv_transpose2d op (apache#9133) [UnitTest] Parametrized test_conv2d_int8_intrinsics (apache#9143) ...
#if TVM_LLVM_VERSION >= 130 | ||
<< llvm::Intrinsic::getBaseName(id).str(); | ||
#else | ||
<< llvm::Intrinsic::getName(id, return_type, {}); | ||
<< llvm::Intrinsic::getName(id, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release/181/llvm-10.0.0/bin/llvm-config --version
13.0.0
Using a copy of the hexagon llvm libraries from early this summer (rev 181) this now triggers a compile error. Did you mean > 130
instead of >=
here?
This reverts commit df50fa3.
* [LLVM] Make changes needed for opaque pointers - Pass value type to all Create.*Load and Create.*GEP functions. - Create type TypedPointer to keep both the address and the pointee's type when buffer pointers etc. are created. - Eliminate calls to getPointerElementType, except one in creating debug info (that seems necessary for the time being). * Fix typo in CodeGenCPU::CreateStructRefPtr * Fix type extraction in CodeGenLLVM::AddAliasInfo * Fix types in ramp-1 vector loads/stores * Fix getting intrinsic name in error message * Return valid pointer from PackClosureData when no data to pack
* [LLVM] Make changes needed for opaque pointers - Pass value type to all Create.*Load and Create.*GEP functions. - Create type TypedPointer to keep both the address and the pointee's type when buffer pointers etc. are created. - Eliminate calls to getPointerElementType, except one in creating debug info (that seems necessary for the time being). * Fix typo in CodeGenCPU::CreateStructRefPtr * Fix type extraction in CodeGenLLVM::AddAliasInfo * Fix types in ramp-1 vector loads/stores * Fix getting intrinsic name in error message * Return valid pointer from PackClosureData when no data to pack
Create.*Load
andCreate.*GEP
functions.TypedPointer
to keep both the address and the pointee's type when buffer pointers etc. are created.getPointerElementType
, except one in creating debug info (that seems necessary for the time being).