llvm.org GIT mirror llvm / e7bfbb7
Merging r298551: ------------------------------------------------------------------------ r298551 | kzhuravl | 2017-03-22 17:48:18 -0400 (Wed, 22 Mar 2017) | 4 lines [AMDGPU] Fix bug 31610 Differential Revision: https://reviews.llvm.org/D31258 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@299441 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
2 changed file(s) with 6 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
4040 namespace RuntimeMD {
4141
4242 // Version and revision of runtime metadata
43 const unsigned char MDVersion = 2;
44 const unsigned char MDRevision = 0;
43 const uint32_t MDVersion = 2;
44 const uint32_t MDRevision = 0;
4545
4646 // Name of keys for runtime metadata.
4747 namespace KeyName {
156156 struct Metadata {
157157 std::string Name;
158158 std::string Language;
159 std::vector8_t> LanguageVersion;
159 std::vector32_t> LanguageVersion;
160160 std::vector ReqdWorkGroupSize;
161161 std::vector WorkGroupSizeHint;
162162 std::string VecTypeHint;
170170 namespace Program {
171171 // In-memory representation of program information.
172172 struct Metadata {
173 std::vector8_t> MDVersionSeq;
173 std::vector32_t> MDVersionSeq;
174174 std::vector PrintfInfo;
175175 std::vector Kernels;
176176
3737 CheckRuntimeMDParser("amdgpu-check-rtmd-parser", cl::Hidden,
3838 cl::desc("Check AMDGPU runtime metadata YAML parser"));
3939
40 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint8_t)
4140 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint32_t)
4241 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(std::string)
4342 LLVM_YAML_IS_SEQUENCE_VECTOR(Kernel::Metadata)
265264 auto Node = MD->getOperand(0);
266265 if (Node->getNumOperands() > 1) {
267266 Kernel.Language = "OpenCL C";
268 uint16_t Major = mdconst::extract(Node->getOperand(0))
267 uint32_t Major = mdconst::extract(Node->getOperand(0))
269268 ->getZExtValue();
270 uint16_t Minor = mdconst::extract(Node->getOperand(1))
269 uint32_t Minor = mdconst::extract(Node->getOperand(1))
271270 ->getZExtValue();
272271 Kernel.LanguageVersion.push_back(Major);
273272 Kernel.LanguageVersion.push_back(Minor);