diff --git a/examples/hello-loopy.py b/examples/hello-loopy.py index efdbf131518adbabe429e29bff60143709396d63..82ff2e60dee345fe16771d09cb39d2d56e9f493d 100644 --- a/examples/hello-loopy.py +++ b/examples/hello-loopy.py @@ -27,4 +27,4 @@ evt, (out,) = knl(queue, a=a) # ENDEXAMPLE cknl = lp.CompiledKernel(ctx, knl) -print cknl.get_highlighted_code({"a": np.float32}) +print(cknl.get_highlighted_code({"a": np.float32})) diff --git a/examples/sem_reagan.py b/examples/sem_reagan.py index 06d2072f6fcd8ad7ea3c2830880b07cd9643f471..39a9ea80960916568b65a7bd2949505cf85fe64a 100644 --- a/examples/sem_reagan.py +++ b/examples/sem_reagan.py @@ -92,7 +92,7 @@ def cannot_schedule_test_tim3d_slab(ctx_factory): knl = duplicate_os(knl) - print knl + print(knl) return knl @@ -192,7 +192,7 @@ def test_tim3d_slab(ctx_factory): # prefetch the derivative matrix knl = lp.add_prefetch(knl, "D[:,:]") - print knl + print(knl) return knl diff --git a/loopy/__init__.py b/loopy/__init__.py index b74219daf10f4ac35acaea282b9f6b790fa9e28d..97dcaa73f83291686d9464400497bdaaedc11e8c 100644 --- a/loopy/__init__.py +++ b/loopy/__init__.py @@ -697,8 +697,8 @@ def link_inames(knl, inames, new_iname, within=None, tag=None): all_equal = True first_proj = projections[0] for proj in projections[1:]: - print proj.gist(first_proj) - print first_proj.gist(proj) + print(proj.gist(first_proj)) + print(first_proj.gist(proj)) all_equal = all_equal and (proj <= first_proj and first_proj <= proj) if not all_equal: diff --git a/loopy/check.py b/loopy/check.py index 45e42945075ac96fe5f992a503a2b563f9100e7e..0f1627ad3004ca061bfa92797cf14a023ca6d2f6 100644 --- a/loopy/check.py +++ b/loopy/check.py @@ -546,12 +546,12 @@ def check_implemented_domains(kernel, implemented_domains, code=None): "sample point %s: %s" % (kind, ", ".join(point_axes))) if code is not None: - print 79*"-" - print "CODE:" - print 79*"-" + print(79*"-") + print("CODE:") + print(79*"-") from loopy.compiled import get_highlighted_cl_code - print get_highlighted_cl_code(code) - print 79*"-" + print(get_highlighted_cl_code(code)) + print(79*"-") raise LoopyError("sanity check failed--implemented and desired " "domain for instruction '%s' do not match\n\n" diff --git a/loopy/compiled.py b/loopy/compiled.py index 3e6b506475616121f7a20bce2fbeb17393fc02ec..02e95c26aa0f162995eaab1c1b59d3942c5b7ea1 100644 --- a/loopy/compiled.py +++ b/loopy/compiled.py @@ -699,7 +699,7 @@ class CompiledKernel: output = get_highlighted_cl_code(output) if self.kernel.options.write_cl is True: - print output + print(output) else: with open(self.kernel.options.write_cl, "w") as outf: outf.write(output)