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
2 changes: 1 addition & 1 deletion docs/source/builder/local-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ cargo install hf-kernel-builder
file. The invocation is as follows:

```bash
$ kernel-builder generate build.toml -f
$ kernel-builder create-pyproject build.toml -f
```

The `-f` flag is optional and instructs `kernel-builder` to overwrite
Expand Down
4 changes: 2 additions & 2 deletions docs/source/builder/nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ project files. For example:

```bash
$ nix develop
$ kernel-builder generate build.toml
$ kernel-builder create-pyproject build.toml
$ cmake -B build-ext
$ cmake --build build-ext
```
Expand All @@ -74,7 +74,7 @@ Python package in this virtual environment:

```bash
$ nix develop
$ kernel-builder generate build.toml
$ kernel-builder create-pyproject build.toml
$ pip install --no-build-isolation -e .
```

Expand Down
5 changes: 2 additions & 3 deletions kernel-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ struct Cli {
#[derive(Debug, Subcommand)]
enum Commands {
/// Generate CMake files for a kernel extension build.
#[command(alias = "generate-torch")]
Generate {
CreatePyproject {
#[arg(name = "BUILD_TOML")]
build_toml: PathBuf,

Expand Down Expand Up @@ -95,7 +94,7 @@ enum Commands {
fn main() -> Result<()> {
let args = Cli::parse();
match args.command {
Commands::Generate {
Commands::CreatePyproject {
build_toml,
force,
target_dir,
Expand Down
2 changes: 1 addition & 1 deletion nix-builder/lib/extension/torch/arch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ stdenv.mkDerivation (prevAttrs: {
src = pkgs.runCommand "source" { } ''
mkdir -p $out
cp -r --no-preserve=mode ${src}/* $out/
${pkgs.kernel-builder}/bin/kernel-builder generate-torch \
${pkgs.kernel-builder}/bin/kernel-builder create-pyproject \
--ops-id ${rev} $out/build.toml
'';

Expand Down
2 changes: 1 addition & 1 deletion nix-builder/lib/extension/torch/no-arch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ stdenv.mkDerivation (prevAttrs: {
src = pkgs.runCommand "source" { } ''
mkdir -p $out
cp -r --no-preserve=mode ${src}/* $out/
${pkgs.kernel-builder}/bin/kernel-builder generate-torch \
${pkgs.kernel-builder}/bin/kernel-builder create-pyproject \
--ops-id ${rev} $out/build.toml
'';

Expand Down
2 changes: 1 addition & 1 deletion nix-builder/lib/extension/tvm-ffi/arch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ stdenv.mkDerivation (prevAttrs: {

# Generate build files.
postPatch = ''
kernel-builder generate \
kernel-builder create-pyproject \
--ops-id ${rev} build.toml
'';

Expand Down
4 changes: 2 additions & 2 deletions nix-builder/scripts/windows/builder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ function Invoke-Backend {
$backendName = if ($Backend -eq 'universal') { 'Universal' } else { $Backend.ToUpper() }
Write-Status "Generating $backendName backend..." -Type Info

$kwargs = @('generate', $BuildToml)
$kwargs = @('create-pyproject', $BuildToml)

if ($Target) { $kwargs += $Target }
if ($Options.Force) { $kwargs += '--force' }
Expand Down Expand Up @@ -574,7 +574,7 @@ try {
# Auto-detect backend from build.toml
Write-Status "Auto-detecting backend from build.toml..." -Type Info

$kwargs = @('generate', $buildTomlPath)
$kwargs = @('create-pyproject', $buildTomlPath)
if ($TargetFolder) { $kwargs += (Resolve-Path $TargetFolder) }
if ($Force) { $kwargs += '--force' }
if ($OpsId) { $kwargs += '--ops-id', $OpsId }
Expand Down
Loading