Skip to content

Commit

Permalink
Added linetrace=true Cython directive to all .pyx files
Browse files Browse the repository at this point in the history
This is safe to do per

https://cython.readthedocs.io/en/latest/src/tutorial/profiling_tutorial.html#enabling-line-tracing

Its use allows improved coverage testing of Cython modules when Cython
sources are compiled with CYTHON_TRACE/CYTHON_TRACE_NOGIL preprocessor
variables defined.
  • Loading branch information
oleksandr-pavlyk committed May 21, 2021
1 parent aadb0ca commit 3eee7d1
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions dpctl/_sycl_context.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

""" Implements SyclContext Cython extension type.
"""
Expand Down
1 change: 1 addition & 0 deletions dpctl/_sycl_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

""" Implements SyclDevice Cython extension type.
"""
Expand Down
1 change: 1 addition & 0 deletions dpctl/_sycl_device_factory.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

""" This module implements several device creation helper functions:
Expand Down
1 change: 1 addition & 0 deletions dpctl/_sycl_event.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

""" Implements SyclEvent Cython extension type.
"""
Expand Down
1 change: 1 addition & 0 deletions dpctl/_sycl_platform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

""" Implements SyclPlatform Cython extension type.
"""
Expand Down
1 change: 1 addition & 0 deletions dpctl/_sycl_queue.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

""" Implements SyclQueue Cython extension type.
"""
Expand Down
1 change: 1 addition & 0 deletions dpctl/_sycl_queue_manager.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

from __future__ import print_function

Expand Down
1 change: 1 addition & 0 deletions dpctl/memory/_memory.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

"""This file implements Python buffer protocol using Sycl USM shared and host
allocators. The USM device allocator is also exposed through this module for
Expand Down
1 change: 1 addition & 0 deletions dpctl/program/_program.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

"""Implements a Python interface for SYCL's program and kernel runtime classes.
Expand Down
1 change: 1 addition & 0 deletions dpctl/tensor/_usmarray.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=true

import numpy as np

Expand Down

0 comments on commit 3eee7d1

Please sign in to comment.