Skip to content

Commit 4e67df7

Browse files
authored
Treating pulse duration as uint64_t (#159)
MLIR does does not have a `UI64IntegerAttr` so duration is stored as `I64IntegerAttr` but should be treated as a `uint64_t` (which is done throughout the codebase). The change of this PR is so that it's done in loadPulseCals pass as well.
1 parent e12883f commit 4e67df7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Conversion/QUIRToPulse/LoadPulseCals.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ bool LoadPulseCalsPass::doAllSequenceOpsHaveSameDuration(
533533
if (!sequenceOp->hasAttrOfType<IntegerAttr>("pulse.duration"))
534534
return false;
535535

536-
uint sequenceDuration =
537-
sequenceOp->getAttrOfType<IntegerAttr>("pulse.duration").getUInt();
536+
uint sequenceDuration = static_cast<uint64_t>(
537+
sequenceOp->getAttrOfType<IntegerAttr>("pulse.duration").getInt());
538538
if (!prevSequenceEncountered) {
539539
prevSequenceEncountered = true;
540540
prevSequencePulseDuration = sequenceDuration;

0 commit comments

Comments
 (0)