@@ -369,52 +369,6 @@ convertShaped8BitFloatType(ShapedType type,
369
369
return type.clone (convertedElementType);
370
370
}
371
371
372
- // / Converts a sub-byte float ``type` to i32 regardless of target environment.
373
- // / Returns a nullptr for unsupported float types, including non sub-byte
374
- // / types.
375
- // /
376
- // / We are treating 8 bit floats as sub-byte types here due to it's similar
377
- // / nature of being used as a packed format.
378
-
379
- // / Note that we don't recognize
380
- // / sub-byte types in `spirv::ScalarType` and use the above given that these
381
- // / sub-byte types are not supported at all in SPIR-V; there are no
382
- // / compute/storage capability for them like other supported integer types.
383
-
384
- // static Type convertPackedFLoatType(const SPIRVConversionOptions &options,
385
- // FloatType type) {
386
-
387
- // // F4, F6, F8 types are converted to integer types with the same bit width.
388
-
389
- // if (isa<Float8E5M2Type, Float8E4M3Type, Float8E4M3FNType,
390
- // Float8E5M2FNUZType,
391
- // Float8E4M3FNUZType, Float8E4M3B11FNUZType, Float8E3M4Type,
392
- // Float4E2M1FNType, Float6E2M3FNType, Float6E3M2FNType,
393
- // Float8E8M0FNUType>(type))
394
- // auto emulatedType = IntegerType::get(type.getContext(), type.getWidth());
395
-
396
- // if (type.getWidth() > 8) {
397
- // LLVM_DEBUG(llvm::dbgs() << "not a packed type\n");
398
- // return nullptr;
399
- // }
400
- // if (options.subByteTypeStorage != SPIRVSubByteTypeStorage::Packed) {
401
- // LLVM_DEBUG(llvm::dbgs() << "unsupported sub-byte storage kind\n");
402
- // return nullptr;
403
- // }
404
-
405
- // // if (!llvm::isPowerOf2_32(type.getWidth())) {
406
- // // LLVM_DEBUG(llvm::dbgs()
407
- // // << "unsupported non-power-of-two bitwidth in sub-byte" <<
408
- // type
409
- // // << "\n");
410
- // // return nullptr;
411
- // // }
412
-
413
- // LLVM_DEBUG(llvm::dbgs() << type << " converted to 32-bit for SPIR-V\n");
414
- // return IntegerType::get(type.getContext(), /*width=*/32,
415
- // type.getSignedness());
416
- // }
417
-
418
372
// / Returns a type with the same shape but with any index element type converted
419
373
// / to the matching integer type. This is a noop when the element type is not
420
374
// / the index type.
0 commit comments