Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion csrc/batch_decode.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <flashinfer/attention/decode.cuh>
#include <flashinfer/attention/scheduler.cuh>
#include <flashinfer/pos_enc.cuh>
#include <flashinfer/utils.cuh>
Expand Down
16 changes: 13 additions & 3 deletions flashinfer/jit/core.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import dataclasses
import logging
import os
import tvm_ffi
from contextlib import nullcontext
from datetime import datetime
from pathlib import Path
from typing import Dict, List, Optional, Sequence, Union
from datetime import datetime

import tvm_ffi
from filelock import FileLock

from ..compilation_context import CompilationContext
from . import env as jit_env
from .cpp_ext import generate_ninja_build_for_op, run_ninja
from .utils import write_if_different
from ..compilation_context import CompilationContext

os.makedirs(jit_env.FLASHINFER_WORKSPACE_DIR, exist_ok=True)
os.makedirs(jit_env.FLASHINFER_CSRC_DIR, exist_ok=True)
Expand Down Expand Up @@ -193,6 +193,16 @@ def get_library_path(self) -> Path:
return self.aot_path
return self.jit_library_path

def get_object_paths(self) -> List[Path]:
object_paths = []
jit_dir = self.jit_library_path.parent
for source in self.sources:
is_cuda = source.suffix == ".cu"
object_suffix = ".cuda.o" if is_cuda else ".o"
obj_name = source.with_suffix(object_suffix).name
object_paths.append(jit_dir / obj_name)
return object_paths

@property
def aot_path(self) -> Path:
return jit_env.FLASHINFER_AOT_DIR / self.name / f"{self.name}.so"
Expand Down