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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions test/Microsoft.ML.PerformanceTests/Harness/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ protected virtual Job GetJobDefinition()
/// </summary>
private IToolchain CreateToolchain()
{
TimeSpan timeout = TimeSpan.FromMinutes(5);

#if NETFRAMEWORK
var tfm = "net461";
var csProj = CsProjClassicNetToolchain.Net461;
var csProj = CsProjClassicNetToolchain.From(tfm, timeout: timeout);
#else
var tfm = AppDomain.CurrentDomain.GetData("FX_PRODUCT_VERSION") == null ?
NetCoreAppSettings.NetCoreApp21.TargetFrameworkMoniker : NetCoreAppSettings.NetCoreApp31.TargetFrameworkMoniker;
var csProj = AppDomain.CurrentDomain.GetData("FX_PRODUCT_VERSION") == null ?
CsProjCoreToolchain.NetCoreApp21 : CsProjCoreToolchain.NetCoreApp31;
var settings = AppDomain.CurrentDomain.GetData("FX_PRODUCT_VERSION") == null
? NetCoreAppSettings.NetCoreApp21 : NetCoreAppSettings.NetCoreApp31;

settings = settings.WithTimeout(timeout);

var tfm = settings.TargetFrameworkMoniker;
var csProj = CsProjCoreToolchain.From(settings);
#endif
return new Toolchain(
tfm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,4 @@
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>
<ItemGroup>
<MetaFile Update="@(MetaFile)">
<Url>https://aka.ms/mlnet-resources/meta/%(Identity)</Url>
<DestinationFile>$([System.IO.Path]::GetTempPath())/MLNET/</DestinationFile>
</MetaFile>
<TensorflowMetaFile Include="@(MetaFile->'$([System.IO.Path]::GetTempPath())/MLNET/%(Identity)')" />
</ItemGroup>
<Target Name="DownloadTensorflowMetaFiles" Inputs="@(TensorflowMetaFile)" Outputs="%(TensorflowMetaFile.DestinationFile)">
<Message Importance="High" Text="Downloading tensorflow meta files... %(TensorflowMetaFile.DestinationFile)" />
<DownloadFile
SourceUrl="%(MetaFile.Url)"
DestinationFolder="$([System.IO.Path]::GetTempPath())/MLNET/"
Retries="5"
SkipUnchangedFiles="true">
</DownloadFile>
</Target>
</Project>