Skip to content

CompilableDesign.include_paths is not forwarded to the C++ compiler #3645

Description

@hunhoffe

What happened?

include_paths on CompilableDesign/compileconfig() is documented as "Extra -I paths forwarded to the C++ compiler," but nothing forwards it.

compile() compiles kernels via compile_external_kernel(func, kernel_dir, target_arch) (utils.py:557), which takes no include-path arg from the design. The actual -I flags come only from each ExternalFunction's own _include_dirs (kernel.py:344, via compile_cxx_core_function's include_dirs param).

So include_paths is stored, serialized, and (after #3641) hashed, but has zero effect on compilation — two designs differing only in include_paths compile to identical objects today.

Fix: thread include_paths into compile_external_kernel / compile_cxx_core_function, merged with each kernel's own include_dirs (order TBD). Also decide behavior for .mlir-path designs with no ExternalFunction instances.

Found while reviewing #3641 (thanks @atassis !)

Hardware / device

No response

Version

No response

Relevant logs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needediron-pythonqualityImprove code quality: maintainability, cleanup, code reorganization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions