Skip to content

It should be possible to accept and return tensor<i1> #958

Closed

Description

@stellaraccident

Currently, this results in a warning such as: Result #0 of function simple_mul is not a recognized public ABI type and the function may not be invokable by standard tools

(and the function will not be invokable from Python, et al)

Activity

  1. added
    compiler/dialects
    integrations
    runtime
    on Mar 19, 2020
  2. benvanik commented on Nov 21, 2020

    @benvanik
    Collaborator

    @hanhanW I believe you fixed this, correct? if so you can tag as obsolete and close

  3. benvanik commented on Nov 22, 2020

    @benvanik
    Collaborator

    This may be related to #3102 but different parts of the system (this is the python API/etc, but #3102 is the compiler internals).

  4. hanhanW commented on Nov 30, 2020

    @hanhanW
    Contributor

    Tested with:

    func @compare_tensor() -> tensor<4xi1> attributes { iree.module.export } {
      %lhs = iree.unfoldable_constant dense<[1, 2, 7, 4]> : tensor<4xi32>
      %rhs = iree.unfoldable_constant dense<[5, 2, 3, 4]> : tensor<4xi32>
      %result = "mhlo.compare"(%lhs, %rhs) {comparison_direction = "EQ"} : (tensor<4xi32>, tensor<4xi32>) -> tensor<4xi1>
      return %result : tensor<4xi1>
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

compiler/dialectsintegrationsruntime

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions