diff --git a/tfjs-converter/scripts/kernels_to_ops.bzl b/tfjs-converter/scripts/kernels_to_ops.bzl index 7e3177921e1..6b119a2bd77 100644 --- a/tfjs-converter/scripts/kernels_to_ops.bzl +++ b/tfjs-converter/scripts/kernels_to_ops.bzl @@ -17,16 +17,14 @@ load("@build_bazel_rules_nodejs//:providers.bzl", "run_node") def _kernels_to_ops_impl(ctx): output_file = ctx.outputs.out - run_node( ctx, executable = "kernels_to_ops_bin", inputs = ctx.files.srcs, outputs = [output_file], - chdir = "tfjs-converter", arguments = [ "--out", - "../" + output_file.path, # '../' due to chdir above + output_file.path, ], ) diff --git a/tfjs-converter/scripts/kernels_to_ops.ts b/tfjs-converter/scripts/kernels_to_ops.ts index ca689b6a535..9ff1f6998a8 100644 --- a/tfjs-converter/scripts/kernels_to_ops.ts +++ b/tfjs-converter/scripts/kernels_to_ops.ts @@ -70,7 +70,7 @@ type KernelMapping = { function getKernelMappingForFile(source: SourceFile) { const switchStatement = getSwitchStatement(source); - if (switchStatement === null) { + if (switchStatement == null) { throw new Error('No switch statment found in executor'); } const caseClauses = switchStatement.getClauses(); @@ -138,7 +138,7 @@ function getKernelMapping() { } async function run(outputFilePath: string) { - const EXECUTORS_PATH = 'src/operations/executors/*_executor.ts'; + const EXECUTORS_PATH = 'tfjs-converter/src/operations/executors/*_executor.ts'; project.addSourceFilesAtPaths(EXECUTORS_PATH); const kernelMapping = getKernelMapping();