arrayfire / arrayfire-python

Python bindings for ArrayFire: A general purpose GPU library.

Home Page:https://arrayfire.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

View AST/kernels

r-barnes opened this issue · comments

Is there any sort of debug mode that would allow one to view the ASTs or the resulting kernels?

@r-barnes Do you mean JIT kernels ?

If yes, on master branch, we added a new environment variable support if set will enable dumping the JIT kernels to appropriate location.

AF_JIT_KERNEL_TRACE

When set, this environment variable has to be set to one of the following three values:

    stdout : generated kernels will be printed to standard output
    stderr : generated kernels will be printed to standard error stream
    absolute path to a folder on the disk where generated kernels will be stored

CUDA backend kernels are stored in files with cu file extension.

OpenCL backend kernels are stored in files with cl file extension. 

Please note that this new environment variable is not yet available in 3.6.4 release.

Please close the issue if you are question has been answered.

I think this'll do what I need. I'll try to test sometime this week and report back.

To clarify, you mean master of arrayfire proper, not arrayfire-python, which hasn't been committed to lately.

This works pretty great, thanks.