Skip to content

Add option to specify compiler flags on the CPU (like -ffast-math) #454

@martinloretzzz

Description

@martinloretzzz

The -ffast-math compiler flag isn't set on the CPU device, it would be cool if one can specify custom compile flags for the CPU device in the build.toml.

The current compile command is the following:

Build Command `/nix/store/m6s7rszf3mbmgnba8l3bmzn22f4s39c6-gcc-wrapper-13.4.0/bin/g++ -DCPU_KERNEL -DPy_LIMITED_API=3 -DTORCH_EXTENSION_NAME=_slstm_kernels_cpu_9603e67_dirty -DUSE_C10D_GLOO -DUSE_DISTRIBUTED -DUSE_RPC -DUSE_TENSORPIPE -D_slstm_kernels_cpu_9603e67_dirty_EXPORTS -I/nix/var/nix/builds/nix-976535-1632023732/source/slstm_cpu/external/eigen -I/nix/var/nix/builds/nix-976535-1632023732/source/csrc -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/dmic0d3gwcdakzsq8nfnqyp7fyb3kskh-python3.13-torch-2.10.0/lib/python3.13/site-packages/torch/include -isystem /nix/store/dmic0d3gwcdakzsq8nfnqyp7fyb3kskh-python3.13-torch-2.10.0/lib/python3.13/site-packages/torch/include/torch/csrc/api/include -O3 -DNDEBUG -fPIC -MD -MT CMakeFiles/_slstm_kernels_cpu_9603e67_dirty.dir/slstm_cpu/slstm_cpu.cpp.o -MF CMakeFiles/_slstm_kernels_cpu_9603e67_dirty.dir/slstm_cpu/slstm_cpu.cpp.o.d -o CMakeFiles/_slstm_kernels_cpu_9603e67_dirty.dir/slstm_cpu/slstm_cpu.cpp.o -c /nix/var/nix/builds/nix-976535-1632023732/source/slstm_cpu/slstm_cpu.cpp`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions