Lines Matching defs:targetEnv

83 /// with the given `targetEnv`.
90 LabelT label, const spirv::TargetEnv &targetEnv,
93 if (targetEnv.allows(ors))
118 LabelT label, const spirv::TargetEnv &targetEnv,
121 if (targetEnv.allows(ors))
254 /// Converts a scalar `type` to a suitable type under the given `targetEnv`.
256 convertScalarType(const spirv::TargetEnv &targetEnv,
266 if (succeeded(checkCapabilityRequirements(type, targetEnv, capabilities)) &&
267 succeeded(checkExtensionRequirements(type, targetEnv, extensions)))
285 return Builder(targetEnv.getContext()).getF32Type();
290 return IntegerType::get(targetEnv.getContext(), /*width=*/32,
338 /// Converts a vector `type` to a suitable type under the given `targetEnv`.
340 convertVectorType(const spirv::TargetEnv &targetEnv,
373 return convertScalarType(targetEnv, options, scalarType, storageClass);
388 if (succeeded(checkCapabilityRequirements(type, targetEnv, capabilities)) &&
389 succeeded(checkExtensionRequirements(type, targetEnv, extensions)))
393 convertScalarType(targetEnv, options, scalarType, storageClass);
400 convertComplexType(const spirv::TargetEnv &targetEnv,
411 convertScalarType(targetEnv, options, scalarType, storageClass);
423 /// Converts a tensor `type` to a suitable type under the given `targetEnv`.
429 static Type convertTensorType(const spirv::TargetEnv &targetEnv,
462 Type arrayElemType = convertScalarType(targetEnv, options, scalarType);
476 static Type convertBoolMemrefType(const spirv::TargetEnv &targetEnv,
491 convertScalarType(targetEnv, options, elementType, storageClass);
505 if (targetEnv.allows(spirv::Capability::Kernel))
524 if (targetEnv.allows(spirv::Capability::Kernel))
529 static Type convertSubByteMemrefType(const spirv::TargetEnv &targetEnv,
542 if (targetEnv.allows(spirv::Capability::Kernel))
562 if (targetEnv.allows(spirv::Capability::Kernel))
567 static Type convertMemrefType(const spirv::TargetEnv &targetEnv,
584 return convertBoolMemrefType(targetEnv, options, type, storageClass);
586 return convertSubByteMemrefType(targetEnv, options, type, storageClass);
593 convertVectorType(targetEnv, options, vecType, storageClass);
596 convertComplexType(targetEnv, options, complexType, storageClass);
599 convertScalarType(targetEnv, options, scalarType, storageClass);
624 if (targetEnv.allows(spirv::Capability::Kernel))
649 if (targetEnv.allows(spirv::Capability::Kernel))
659 /// `targetEnv`'s capabilities.
671 static Value castToSourceType(const spirv::TargetEnv &targetEnv,
713 if (failed(checkCapabilityRequirements(type, targetEnv, caps)) ||
714 failed(checkExtensionRequirements(type, targetEnv, exts))) {
1418 : targetEnv(targetAttr), options(options) {
1435 return convertScalarType(this->targetEnv, this->options, scalarType);
1443 return convertScalarType(this->targetEnv, this->options, scalarType);
1448 return convertComplexType(this->targetEnv, this->options, complexType);
1452 return convertVectorType(this->targetEnv, this->options, vectorType);
1456 return convertTensorType(this->targetEnv, this->options, tensorType);
1460 return convertMemrefType(this->targetEnv, this->options, memRefType);
1466 return castToSourceType(this->targetEnv, builder, type, inputs, loc);
1480 return targetEnv.getAttr().getContext();
1484 return targetEnv.allows(capability);
1505 : ConversionTarget(*targetAttr.getContext()), targetEnv(targetAttr) {}
1513 if (minVersion && *minVersion > this->targetEnv.getVersion()) {
1522 if (maxVersion && *maxVersion < this->targetEnv.getVersion()) {
1534 if (failed(checkExtensionRequirements(op->getName(), this->targetEnv,
1542 if (failed(checkCapabilityRequirements(op->getName(), this->targetEnv,
1567 if (failed(checkExtensionRequirements(op->getName(), this->targetEnv,
1573 if (failed(checkCapabilityRequirements(op->getName(), this->targetEnv,