Skip to content

Fix TOSA related breakages #2751

@sdasgup3

Description

@sdasgup3

Hi @Tai78641

The recent TOSA dialect changes introduced by https://github.com/llvm/llvm-project/pull/129720 have caused breakages, for example:

/usr/local/google/home/sdasgup/Github/stablehlo/stablehlo/conversions/tosa/transforms/TosaRescaleLegalizeToStablehlo.cpp:68:25: error: no member named 'getRoundingMode' in 'mlir::tosa::RescaleOp'                
  bool doubleRound = op.getRoundingMode() == "DOUBLE_ROUND";                                                                                                                                                       
                     ~~ ^                                                                                                                                                                                          
/usr/local/google/home/sdasgup/Github/stablehlo/stablehlo/conversions/tosa/transforms/TosaRescaleLegalizeToStablehlo.cpp:110:9: error: no viable conversion from '::llvm::ArrayRef<int32_t>' (aka 'ArrayRef<int>') 
to 'Value'                                                                                                                                                                                                         
  Value multiplier = op.getMultiplier();   

The PR is an attempt to address some of these issues, but it appears that the problem is more involving than we initially anticipated. Do you mind helping us updating the StablehloQuantLegalizeToTosaRescale.cpp and TosaRescaleLegalizeToStablehlo.cpp passes to accommodate these recent changes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions