diff --git a/build_linux.sh b/build_linux.sh index 3b9571b..e98f08f 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -49,7 +49,5 @@ echo "Building wheels..." cd flash-attention LOCAL_VERSION_LABEL="cu${MATRIX_CUDA_VERSION}torch${MATRIX_TORCH_VERSION}" FLASH_ATTENTION_FORCE_BUILD=TRUE FLASH_ATTN_LOCAL_VERSION=${LOCAL_VERSION_LABEL} python setup.py bdist_wheel --dist-dir=dist -base_wheel_name=$(basename $(ls dist/*.whl | head -n 1)) -wheel_name=$(echo $base_wheel_name | sed "s/$FLASH_ATTN_VERSION/$FLASH_ATTN_VERSION+cu${MATRIX_CUDA_VERSION}torch${MATRIX_TORCH_VERSION}/") -mv -v dist/$base_wheel_name dist/$wheel_name +wheel_name=$(basename $(ls dist/*.whl | head -n 1)) echo "Built wheel: $wheel_name" diff --git a/build_windows.ps1 b/build_windows.ps1 index c9f32e0..2bc6043 100644 --- a/build_windows.ps1 +++ b/build_windows.ps1 @@ -1,13 +1,13 @@ param( [Parameter(Mandatory=$true)] [string]$FlashAttnVersion, - + [Parameter(Mandatory=$true)] [string]$PythonVersion, - + [Parameter(Mandatory=$true)] [string]$TorchVersion, - + [Parameter(Mandatory=$true)] [string]$CudaVersion ) @@ -72,8 +72,5 @@ $env:FLASH_ATTN_LOCAL_VERSION = "cu$MatrixCudaVersion" + "torch$MatrixTorchVersi cd flash-attention python setup.py bdist_wheel --dist-dir=dist -$baseWheelName = Get-ChildItem -Path "dist\*.whl" | Select-Object -First 1 | ForEach-Object { $_.Name } -$wheelName = $baseWheelName.Replace($FlashAttnVersion, "$FlashAttnVersion+cu$MatrixCudaVersion" + "torch$MatrixTorchVersion") -Move-Item "dist\$baseWheelName" "dist\$wheelName" +$WheelName = Get-ChildItem -Path "dist\*.whl" | Select-Object -First 1 | ForEach-Object { $_.Name } Write-Host "Built wheel: $wheelName" -cd ..