Skip to content

Commit

Permalink
Fixed vulkan and coreml targets (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrohanea authored Oct 14, 2024
1 parent a411f45 commit 5f8c302
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ MigrationBackup/
!/runtimes/Whisper.net.Runtime.Cuda.*/Whisper.net.Runtime.Cuda.*.targets

/runtimes/Whisper.net.Runtime.Vulkan/*
!/Whisper.net.Runtime.Vulkan/Whisper.net.Runtime.Vulkan.targets
!/runtimes/Whisper.net.Runtime.Vulkan/Whisper.net.Runtime.Vulkan.targets

/runtimes/Whisper.net.Runtime.CoreML/*
!/runtimes/Whisper.net.Runtime.CoreML/Whisper.net.Runtime.CoreML.targets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,22 @@
<TargetPath>libwhisper.coreml.dylib</TargetPath>
</None>
</ItemGroup>
<ItemGroup>
<!-- Metal Maui asset for maccatalyst, ios, tvos and their simulators -->
<ItemGroup Condition="$(RuntimeIdentifier.StartsWith('tvos-')) or $(RuntimeIdentifier.StartsWith('tvossimulator-')) or (('$(Platform)' == 'iPhone') OR ('$(RuntimeIdentifier)' == 'ios') OR $(RuntimeIdentifier.StartsWith('ios-')) OR $(RuntimeIdentifier.StartsWith('ios.'))) or $(TargetFramework.Contains('-maccatalyst')) == true or (('$(Platform)' == 'iPhoneSimulator') OR $(RuntimeIdentifier.StartsWith('iossimulator')))">
<MauiAsset Include="$(MSBuildThisFileDirectory)\ggml-metal.metal" LogicalName="ggml-metal.metal" />
</ItemGroup>

<!-- Metal Copy For MacOS -->
<ItemGroup Condition="$(TargetFramework.Contains('-')) == false">
<None Visible="false" Include="$(MSBuildThisFileDirectory)\ggml-metal.metal">
<Pack>true</Pack>
<PackageCopyToOutput>true</PackageCopyToOutput>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>ggml-metal.metal</TargetPath>
<PublishFolderType>RootDirectory</PublishFolderType>
</None>
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-')) == false ">
<None Visible="false" Include="$(MSBuildThisFileDirectory)macos-x64\libwhisper.dylib">
<Pack>true</Pack>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup
Condition="$(TargetFramework.Contains('-windows')) == true or $(TargetFramework.Contains('-')) == false">
<None Visible="false" Include="$(MSBuildThisFileDirectory)win-x64\whisper.dll">
<Pack>true</Pack>
<PackageCopyToOutput>true</PackageCopyToOutput>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>runtimes/vulkan/win-x64/whisper.dll</TargetPath>
</None>
<None Visible="false" Include="$(MSBuildThisFileDirectory)win-x64\ggml.dll">
<Pack>true</Pack>
<PackageCopyToOutput>true</PackageCopyToOutput>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>runtimes/vulkan/win-x64/ggml.dll</TargetPath>
</None>
</ItemGroup>
</Project>

0 comments on commit 5f8c302

Please sign in to comment.