From 7103cc58bbeb2ff93371fe69e788b850e2c72013 Mon Sep 17 00:00:00 2001 From: moven0831 Date: Fri, 19 Apr 2024 00:09:57 +0800 Subject: [PATCH] fix(gpu-benchmark): comment the download of instance from api server, now test_ios shoud success --- .../MoproKit/MSMBenchmarkViewController.swift | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/mopro-ios/MoproKit/Example/MoproKit/MSMBenchmarkViewController.swift b/mopro-ios/MoproKit/Example/MoproKit/MSMBenchmarkViewController.swift index 72489885..30b4556c 100644 --- a/mopro-ios/MoproKit/Example/MoproKit/MSMBenchmarkViewController.swift +++ b/mopro-ios/MoproKit/Example/MoproKit/MSMBenchmarkViewController.swift @@ -11,24 +11,24 @@ import MoproKit class MSMBenchmarkViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { - let pointUrl = URL(string: "https://mopro-msm.s3.eu-north-1.amazonaws.com/vectors/16x10/points") - let scalarUrl = URL(string: "https://mopro-msm.s3.eu-north-1.amazonaws.com/vectors/16x10/scalars") - func runDownloadAction() { - let pointStart = CFAbsoluteTimeGetCurrent() - FileDownloader.loadFileAsync(url: self.pointUrl!) { (path, error) in - print("Points File downloaded to : \(path!)") - let pointEnd = CFAbsoluteTimeGetCurrent() - print("Download points took:", pointEnd - pointStart, "s") - } + // let pointUrl = URL(string: "https://mopro-msm.s3.eu-north-1.amazonaws.com/vectors/16x10/points") + // let scalarUrl = URL(string: "https://mopro-msm.s3.eu-north-1.amazonaws.com/vectors/16x10/scalars") + // func runDownloadAction() { + // let pointStart = CFAbsoluteTimeGetCurrent() + // FileDownloader.loadFileAsync(url: self.pointUrl!) { (path, error) in + // print("Points File downloaded to : \(path!)") + // let pointEnd = CFAbsoluteTimeGetCurrent() + // print("Download points took:", pointEnd - pointStart, "s") + // } - let scalarStart = CFAbsoluteTimeGetCurrent() - FileDownloader.loadFileAsync(url: self.scalarUrl!) { (path, error) in - print("Scalars File downloaded to : \(path!)") - let scalarEnd = CFAbsoluteTimeGetCurrent() - print("Download scalars took:", scalarEnd - scalarStart, "s") - } + // let scalarStart = CFAbsoluteTimeGetCurrent() + // FileDownloader.loadFileAsync(url: self.scalarUrl!) { (path, error) in + // print("Scalars File downloaded to : \(path!)") + // let scalarEnd = CFAbsoluteTimeGetCurrent() + // print("Download scalars took:", scalarEnd - scalarStart, "s") + // } - } + // } struct AlgorithmBenchmark { var algorithm: String @@ -289,8 +289,8 @@ class MSMBenchmarkViewController: UIViewController, UITableViewDelegate, UITable if let benchmarkFunction = self.msmBenchmarkMapping[algorithm] { do { let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! - let pointPath = documentsUrl.appendingPathComponent((pointUrl!).lastPathComponent) - let scalarPath = documentsUrl.appendingPathComponent((scalarUrl!).lastPathComponent) + // let pointPath = documentsUrl.appendingPathComponent((pointUrl!).lastPathComponent) + // let scalarPath = documentsUrl.appendingPathComponent((scalarUrl!).lastPathComponent) let documentsPath = documentsUrl.path let instanceSize: UInt32 = 16; let numInstance: UInt32 = 10;