mirror of
https://git.freebsd.org/ports.git
synced 2025-06-05 12:56:28 -04:00
misc/flashlight: New port: Standalone C++ library for machine learning
This commit is contained in:
parent
3f9d30d727
commit
c15247cb4f
6 changed files with 200 additions and 0 deletions
|
@ -107,6 +107,7 @@
|
|||
SUBDIR += findutils
|
||||
SUBDIR += firestring
|
||||
SUBDIR += flag
|
||||
SUBDIR += flashlight
|
||||
SUBDIR += fortune-mod-bible
|
||||
SUBDIR += fortune-mod-bofh
|
||||
SUBDIR += fortune-mod-epictetus
|
||||
|
|
31
misc/flashlight/Makefile
Normal file
31
misc/flashlight/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
PORTNAME= flashlight
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.4.0-16
|
||||
DISTVERSIONSUFFIX= -gafcd364e
|
||||
CATEGORIES= misc # machine-learning
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
COMMENT= Standalone C++ library for machine learning
|
||||
WWW= https://github.com/flashlight/flashlight
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= cereal>0:devel/cereal
|
||||
LIB_DEPENDS= libdnnl.so:math/onednn252
|
||||
|
||||
USES= cmake:testing compiler:c++17-lang localbase pkgconfig
|
||||
USE_GITHUB= yes
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
CMAKE_OFF= FL_USE_ARRAYFIRE \
|
||||
FL_BUILD_TESTS FL_BUILD_EXAMPLES
|
||||
CMAKE_OFF+= FL_BUILD_DISTRIBUTED # need to add MPI options
|
||||
CMAKE_ON= BUILD_SHARED_LIBS \
|
||||
FL_USE_CPU
|
||||
CMAKE_ON+= FL_USE_ONEDNN # needs to have oneDNN enabled because it needs a working tensor backend
|
||||
|
||||
post-patch: # workaround for https://github.com/flashlight/flashlight/issues/1086
|
||||
@${RM} ${WRKSRC}/cmake/Findcereal.cmake
|
||||
|
||||
.include <bsd.port.mk>
|
3
misc/flashlight/distinfo
Normal file
3
misc/flashlight/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1678872027
|
||||
SHA256 (flashlight-flashlight-v0.4.0-16-gafcd364e_GH0.tar.gz) = fef0eaf57a1ac58255be5d428265cb829b976ca5580215ba81406cb8808a743b
|
||||
SIZE (flashlight-flashlight-v0.4.0-16-gafcd364e_GH0.tar.gz) = 1966617
|
|
@ -0,0 +1,22 @@
|
|||
- workaround for https://github.com/flashlight/flashlight/issues/1087
|
||||
|
||||
--- flashlight/fl/dataset/FileBlobDataset.cpp.orig 2023-03-15 07:10:45 UTC
|
||||
+++ flashlight/fl/dataset/FileBlobDataset.cpp
|
||||
@@ -72,7 +72,7 @@ int64_t FileBlobDataset::writeData(
|
||||
auto fs = getStream();
|
||||
fs->seekp(offset, std::ios_base::beg);
|
||||
fs->write(data, size);
|
||||
- return fs->tellp() - offset;
|
||||
+ return int64_t(fs->tellp()) - offset;
|
||||
}
|
||||
|
||||
int64_t FileBlobDataset::readData(int64_t offset, char* data, int64_t size)
|
||||
@@ -80,7 +80,7 @@ int64_t FileBlobDataset::readData(int64_t offset, char
|
||||
auto fs = getStream();
|
||||
fs->seekg(offset, std::ios_base::beg);
|
||||
fs->read(data, size);
|
||||
- return fs->tellg() - offset;
|
||||
+ return int64_t(fs->tellg()) - offset;
|
||||
}
|
||||
|
||||
void FileBlobDataset::flushData() {
|
11
misc/flashlight/pkg-descr
Normal file
11
misc/flashlight/pkg-descr
Normal file
|
@ -0,0 +1,11 @@
|
|||
Flashlight is a fast, flexible machine learning library written entirely in C++
|
||||
from the Facebook AI Research and the creators of Torch, TensorFlow, Eigen and
|
||||
Deep Speech.
|
||||
|
||||
Its core features include:
|
||||
* Total internal modifiability including internal APIs for tensor computation.
|
||||
* A small footprint, with the core clocking in at under 10 MB and 20k lines
|
||||
of C++.
|
||||
* High-performance defaults featuring just-in-time kernel compilation with
|
||||
modern C++ via the ArrayFire tensor library.
|
||||
* An emphasis on efficiency and scale.
|
132
misc/flashlight/pkg-plist
Normal file
132
misc/flashlight/pkg-plist
Normal file
|
@ -0,0 +1,132 @@
|
|||
include/flashlight/fl/autograd/Functions.h
|
||||
include/flashlight/fl/autograd/Utils.h
|
||||
include/flashlight/fl/autograd/Variable.h
|
||||
include/flashlight/fl/autograd/autograd.h
|
||||
include/flashlight/fl/autograd/tensor/AutogradExtension.h
|
||||
include/flashlight/fl/autograd/tensor/AutogradExtensionBackends.h
|
||||
include/flashlight/fl/autograd/tensor/AutogradOps.h
|
||||
include/flashlight/fl/common/Defines.h
|
||||
include/flashlight/fl/common/DevicePtr.h
|
||||
include/flashlight/fl/common/DynamicBenchmark.h
|
||||
include/flashlight/fl/common/Filesystem.h
|
||||
include/flashlight/fl/common/Histogram.h
|
||||
include/flashlight/fl/common/Logging.h
|
||||
include/flashlight/fl/common/Plugin.h
|
||||
include/flashlight/fl/common/Serialization-inl.h
|
||||
include/flashlight/fl/common/Serialization.h
|
||||
include/flashlight/fl/common/Timer.h
|
||||
include/flashlight/fl/common/Types.h
|
||||
include/flashlight/fl/common/Utils.h
|
||||
include/flashlight/fl/common/common.h
|
||||
include/flashlight/fl/common/threadpool/ThreadPool.h
|
||||
include/flashlight/fl/contrib/contrib.h
|
||||
include/flashlight/fl/contrib/modules/AdaptiveEmbedding.h
|
||||
include/flashlight/fl/contrib/modules/AsymmetricConv1D.h
|
||||
include/flashlight/fl/contrib/modules/Conformer.h
|
||||
include/flashlight/fl/contrib/modules/PositionEmbedding.h
|
||||
include/flashlight/fl/contrib/modules/RawWavSpecAugment.h
|
||||
include/flashlight/fl/contrib/modules/Residual.h
|
||||
include/flashlight/fl/contrib/modules/SinusoidalPositionEmbedding.h
|
||||
include/flashlight/fl/contrib/modules/SpecAugment.h
|
||||
include/flashlight/fl/contrib/modules/TDSBlock.h
|
||||
include/flashlight/fl/contrib/modules/Transformer.h
|
||||
include/flashlight/fl/contrib/modules/modules.h
|
||||
include/flashlight/fl/dataset/BatchDataset.h
|
||||
include/flashlight/fl/dataset/BlobDataset.h
|
||||
include/flashlight/fl/dataset/ConcatDataset.h
|
||||
include/flashlight/fl/dataset/Dataset.h
|
||||
include/flashlight/fl/dataset/DatasetIterator.h
|
||||
include/flashlight/fl/dataset/FileBlobDataset.h
|
||||
include/flashlight/fl/dataset/MemoryBlobDataset.h
|
||||
include/flashlight/fl/dataset/MergeDataset.h
|
||||
include/flashlight/fl/dataset/PrefetchDataset.h
|
||||
include/flashlight/fl/dataset/ResampleDataset.h
|
||||
include/flashlight/fl/dataset/ShuffleDataset.h
|
||||
include/flashlight/fl/dataset/TensorDataset.h
|
||||
include/flashlight/fl/dataset/TransformDataset.h
|
||||
include/flashlight/fl/dataset/Utils.h
|
||||
include/flashlight/fl/dataset/datasets.h
|
||||
include/flashlight/fl/distributed/DistributedApi.h
|
||||
include/flashlight/fl/distributed/FileStore.h
|
||||
include/flashlight/fl/distributed/LRUCache.h
|
||||
include/flashlight/fl/distributed/distributed.h
|
||||
include/flashlight/fl/distributed/reducers/CoalescingReducer.h
|
||||
include/flashlight/fl/distributed/reducers/InlineReducer.h
|
||||
include/flashlight/fl/distributed/reducers/Reducer.h
|
||||
include/flashlight/fl/distributed/reducers/reducers.h
|
||||
include/flashlight/fl/flashlight.h
|
||||
include/flashlight/fl/meter/AverageValueMeter.h
|
||||
include/flashlight/fl/meter/CountMeter.h
|
||||
include/flashlight/fl/meter/EditDistanceMeter.h
|
||||
include/flashlight/fl/meter/FrameErrorMeter.h
|
||||
include/flashlight/fl/meter/MSEMeter.h
|
||||
include/flashlight/fl/meter/TimeMeter.h
|
||||
include/flashlight/fl/meter/TopKMeter.h
|
||||
include/flashlight/fl/meter/meters.h
|
||||
include/flashlight/fl/nn/DistributedUtils.h
|
||||
include/flashlight/fl/nn/Init.h
|
||||
include/flashlight/fl/nn/Utils.h
|
||||
include/flashlight/fl/nn/modules/Activations.h
|
||||
include/flashlight/fl/nn/modules/AdaptiveSoftMax.h
|
||||
include/flashlight/fl/nn/modules/BatchNorm.h
|
||||
include/flashlight/fl/nn/modules/Container.h
|
||||
include/flashlight/fl/nn/modules/Conv2D.h
|
||||
include/flashlight/fl/nn/modules/Dropout.h
|
||||
include/flashlight/fl/nn/modules/Embedding.h
|
||||
include/flashlight/fl/nn/modules/Identity.h
|
||||
include/flashlight/fl/nn/modules/LayerNorm.h
|
||||
include/flashlight/fl/nn/modules/Linear.h
|
||||
include/flashlight/fl/nn/modules/Loss.h
|
||||
include/flashlight/fl/nn/modules/Module.h
|
||||
include/flashlight/fl/nn/modules/Normalize.h
|
||||
include/flashlight/fl/nn/modules/Padding.h
|
||||
include/flashlight/fl/nn/modules/Pool2D.h
|
||||
include/flashlight/fl/nn/modules/PrecisionCast.h
|
||||
include/flashlight/fl/nn/modules/RNN.h
|
||||
include/flashlight/fl/nn/modules/Reorder.h
|
||||
include/flashlight/fl/nn/modules/Transform.h
|
||||
include/flashlight/fl/nn/modules/View.h
|
||||
include/flashlight/fl/nn/modules/WeightNorm.h
|
||||
include/flashlight/fl/nn/modules/modules.h
|
||||
include/flashlight/fl/nn/nn.h
|
||||
include/flashlight/fl/optim/AMSgradOptimizer.h
|
||||
include/flashlight/fl/optim/AdadeltaOptimizer.h
|
||||
include/flashlight/fl/optim/AdagradOptimizer.h
|
||||
include/flashlight/fl/optim/AdamOptimizer.h
|
||||
include/flashlight/fl/optim/NAGOptimizer.h
|
||||
include/flashlight/fl/optim/NovogradOptimizer.h
|
||||
include/flashlight/fl/optim/Optimizers.h
|
||||
include/flashlight/fl/optim/RMSPropOptimizer.h
|
||||
include/flashlight/fl/optim/SGDOptimizer.h
|
||||
include/flashlight/fl/optim/Utils.h
|
||||
include/flashlight/fl/optim/optim.h
|
||||
include/flashlight/fl/runtime/CUDADevice.h
|
||||
include/flashlight/fl/runtime/CUDAStream.h
|
||||
include/flashlight/fl/runtime/CUDAUtils.h
|
||||
include/flashlight/fl/runtime/Device.h
|
||||
include/flashlight/fl/runtime/DeviceManager.h
|
||||
include/flashlight/fl/runtime/DeviceType.h
|
||||
include/flashlight/fl/runtime/Stream.h
|
||||
include/flashlight/fl/runtime/SynchronousStream.h
|
||||
include/flashlight/fl/runtime/runtime.h
|
||||
include/flashlight/fl/tensor/Compute.h
|
||||
include/flashlight/fl/tensor/DefaultTensorType.h
|
||||
include/flashlight/fl/tensor/Index.h
|
||||
include/flashlight/fl/tensor/Init.h
|
||||
include/flashlight/fl/tensor/Profile.h
|
||||
include/flashlight/fl/tensor/Random.h
|
||||
include/flashlight/fl/tensor/Shape.h
|
||||
include/flashlight/fl/tensor/TensorAdapter.h
|
||||
include/flashlight/fl/tensor/TensorBackend.h
|
||||
include/flashlight/fl/tensor/TensorBase.h
|
||||
include/flashlight/fl/tensor/TensorExtension.h
|
||||
include/flashlight/fl/tensor/Types.h
|
||||
include/flashlight/fl/tensor/tensor.h
|
||||
lib/libflashlight.so
|
||||
lib/libflashlight.so.0
|
||||
lib/libflashlight.so.0.4.0
|
||||
%%DATADIR%%/cmake/FindFilesystem.cmake
|
||||
%%DATADIR%%/cmake/flashlightConfig.cmake
|
||||
%%DATADIR%%/cmake/flashlightConfigVersion.cmake
|
||||
%%DATADIR%%/cmake/flashlightTargets-%%CMAKE_BUILD_TYPE%%.cmake
|
||||
%%DATADIR%%/cmake/flashlightTargets.cmake
|
Loading…
Add table
Reference in a new issue