summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorMathieu Bridon <[email protected]>2018-07-05 15:17:32 +0200
committerDylan Baker <[email protected]>2018-07-06 10:04:22 -0700
commit0f7b18fa0d353aab0a44082b1aca8d8c00df71a7 (patch)
treee511fe8f70b48ad5203e3a0e52d0dc1b086bfd91 /src/intel
parentb3a42fa0667caeeebabd9e6aeb46a9534810c2f3 (diff)
python: Use the print function
In Python 2, `print` was a statement, but it became a function in Python 3. Using print functions everywhere makes the script compatible with Python versions >= 2.6, including Python 3. Signed-off-by: Mathieu Bridon <[email protected]> Acked-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/compiler/brw_nir_trig_workarounds.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_nir_trig_workarounds.py b/src/intel/compiler/brw_nir_trig_workarounds.py
index 3d08b9a41ea..d60e094c625 100644
--- a/src/intel/compiler/brw_nir_trig_workarounds.py
+++ b/src/intel/compiler/brw_nir_trig_workarounds.py
@@ -31,6 +31,8 @@
# amplitude slightly. Apparently this also minimizes the error function,
# reducing the maximum error from 0.00006 to about 0.00003.
+from __future__ import print_function
+
import argparse
import sys
@@ -51,9 +53,9 @@ def main():
def run():
import nir_algebraic # pylint: disable=import-error
- print '#include "brw_nir.h"'
- print nir_algebraic.AlgebraicPass("brw_nir_apply_trig_workarounds",
- TRIG_WORKAROUNDS).render()
+ print('#include "brw_nir.h"')
+ print(nir_algebraic.AlgebraicPass("brw_nir_apply_trig_workarounds",
+ TRIG_WORKAROUNDS).render())
if __name__ == '__main__':