Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-1785

Call UDFs inline in the expressions without variables

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • SystemML 1.1
    • None
    • None

    Description

      Currently the usage of UDFs is restricted to simply being able to call the UDF and assign the results to a variable. If the user wishes to use the UDF as input to the builtin-op of any sort on the same line, an error is thrown. This is confusing for users and leads to a messy code involving temporary variables.

      example:

       out = my_udf_func(x) + 4

      The UDFs should be treated like any other Op.

      Quick background:
      The functions are initially split into separate statement blocks so they can bind their outputs (potentially many) directly to logical variable names because Hop DAGs cannot represent multiple outputs, just multiple consumers.

      Originally function, function calls were not even represented as Hops but constructed as special instructions. Later we defined a three phase transition for a seamless integration.

      1. 1. Represent function calls via FunctionOps in the Hop DAG.
      2. 2. Allow arbitrary expressions for inputs of FunctionOps.
      3. 3. Allow FunctionOps with single outputs in expressions. (yet to be completed.)

      Solution:
      It would essentially entail modification to the passes(language validate, IPA, rewrites for splitting, Hop DAGs for recompilation, Hop-Lop translation, Lop instruction generation.)

      Attachments

        Issue Links

          Activity

            People

              mboehm7 Matthias Boehm
              janardhan Janardhan Pulivarthi
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: