Commit Graph

1203 Commits

Author SHA1 Message Date
Field G. Van Zee
af1d8470b5 Better handling of shared libraries on OS X.
Details:
- Use the .dylib shared library suffix on OS X (instead of .so in Linux).
- Link with the -dynamiclib and -install_name options on OS X (instead of
  -shared and -soname in Linux).
- Determine operating system (e.g. Linux, Darwin) during configure and
  substitute into config.mk.in rather than run 'uname -s' during make.
- Echo operating system during configure.
2018-05-11 17:49:58 -05:00
Field G. Van Zee
4b72a462d7 Enable building shared library by default.
Details:
- Tweaked configure so that the shared library is generated by default.
- Updated --help text and configure's feedback messages reporting the
  status of the static/shared builds.
- Changed the order of build product installation so that headers are
  installed last, after libraries and symlinks.
2018-05-10 18:35:38 -05:00
Field G. Van Zee
b699bb1ff0 Adopt Linux-like .so versioning at install-time.
Details:
- Changed the naming conventions used for installed libraries and
  symlinks to more closely mirror patterns used by typical GNU/Linux
  libraries. Whereas previously static and shared libraries were
  installed and symlinked as follows:

    (library) libblis-0.3.2-15-haswell.a
    (library) libblis-0.3.2-15-haswell.so
    (symlink) libblis.a -> libblis-0.3.2-15-haswell.a
    (symlink) libblis.so -> libblis-0.3.2-15-haswell.so

  we now use the following naming conventions:

    (library) libblis.a
    (symlink) libblis.so -> libblis.so.0.1.2
    (symlink) libblis.so.0 -> libblis.so.0.1.2
    (library) libblis.so.0.1.2

  where 0.1.2 indicates shared library major, minor, and build versions
  of 0, 1, and 2, respectively. The conventional version string can
  still be queried by linking to the library in question and then calling
  bli_info_get_version_str(). (The testsuite binary does this
  automatically at startup.)
- Added logic to common.mk to set the soname field in the shared library
  via the -soname linker flag.
- Added a 'so_version' file to the top-level directory containing two
  lines. The first line specifies the .so major version number, and the
  second line specifies the minor and build version numbers joined with
  a '.'. This file is read by configure and those values substituted
  into build/config.mk.in to define SO_MAJOR, SO_MINORB, and SO_MMB
  variables.
2018-05-10 15:54:17 -05:00
Field G. Van Zee
fc2d9ec6bf Tweaks to top-level clean and distclean targets.
Details:
- Moved the removal of bli_config.h from cleanh to distclean.
- Removed cleantest as a dependency of clean.
2018-05-09 15:19:28 -05:00
Field G. Van Zee
bf03503059 Renamed (shortened) a few build system variables.
Details:
- Renamed the following variables in config.mk (via build/config.mk.in):
    BLIS_ENABLE_VERBOSE_MAKE_OUTPUT -> ENABLE_VERBOSE
    BLIS_ENABLE_STATIC_BUILD        -> MK_ENABLE_STATIC
    BLIS_ENABLE_SHARED_BUILD        -> MK_ENABLE_SHARED
    BLIS_ENABLE_BLAS2BLIS           -> MK_ENABLE_BLAS
    BLIS_ENABLE_CBLAS               -> MK_ENABLE_CBLAS
    BLIS_ENABLE_MEMKIND             -> MK_ENABLE_MEMKIND
  and also renamed all uses of these variables in makefiles and makefile
  fragments. Notice that we use the "MK_" prefix so that those variables
  can be easily differentiated (such as via grep) from their "BLIS_" C
  preprocessor macro counterparts.
- Other whitespace changes to build/config.mk.in.
- Renamed the following C preprocessor macros in bli_config.h (via
  build/bli_config.h.in):
    BLIS_ENABLE_BLAS2BLIS        -> BLIS_ENABLE_BLAS
    BLIS_DISABLE_BLAS2BLIS       -> BLIS_DISABLE_BLAS
    BLIS_BLAS2BLIS_INT_TYPE_SIZE -> BLIS_BLAS_INT_TYPE_SIZE
  and also renamed all relevant uses of these macros in BLIS source
  files.
- Renamed "blas2blis" variable occurrences in configure to "blas", as
  was done in build/config.mk.in and build/bli_config.h.in.
- Renamed the following functions in frame/base/bli_info.c:
    bli_info_get_enable_blas2blis() -> bli_info_get_enable_blas()
    bli_info_get_blas2blis_int_type_size()
                                    -> bli_info_get_blas_int_type_size()
- Remove bli_config.h during 'make cleanh' target of top-level Makefile.
2018-05-08 16:49:22 -05:00
Field G. Van Zee
7e5648ca15 Add configure support for --libdir, --includedir.
Details:
- Added support for two new configure options: --libdir and --includedir.
  They specify the precise install directories for libraries and header
  files, respectively, and override any location implied by the --prefix
  option (including the default install prefix, if --prefix was not
  given). Thanks to Nico Schlömer for suggesting this via issue #195.
- Removed the INSTALL_PREFIX definition/anchor from build/config.mk.in
  and replaced it with corresponding definitions/anchors for libdir and
  includedir.
- Updated top-level Makefile to use the new variables, INSTALL_LIBDIR
  and INSTALL_INCDIR, instead of INSTALL_PREFIX (which is now no longer
  needed by make).
- Set default sane values for INSTALL_LIBDIR and INSTALL_INCDIR in
  common.mk when configure has not been run, as is already done for
  DIST_PATH. This is to safeguard against statements in the top-level
  Makefile that use 'find' to locate old libraries and headers for the
  uninstall targets, which run regardless of make target. Without setting
  INSTALL_LIBDIR and INSTALL_INCDIR, those variables are empty and the
  'find' ends up looking at '/', which is obviously not what we want.
  (Also enclosed those definitions in an IS_CONFIGURED guard so that they
  won't get evaluated unless configure has been run.)
- Rearranged "ifeq ($(IS_CONFIGURED),yes)" conditionals in Makefile to
  reduce occurrences and separated "local" and top-level components of
  cleanblastest and cleanblistest targets to improve readability.
- Adjusted out-of-tree builds so that they are no longer oblivious to
  the .git directories, if present, and thus now properly augment version
  strings with the appropriate patch number.
- Include missing version string in 'configure --help' output.
2018-05-07 18:59:19 -05:00
Field G. Van Zee
b09e4e8852 Allow 'make clean' and friends without configuring.
Details:
- Modified top-level Makefile so that a user can run 'make distclean',
  'make clean', or any of the other clean-related targets prior to
  running configure (or after a previous 'make distclean'). Thanks to
  Nico Schlömer for suggesting this via issue #197.
- Made the cleanblastest and cleanblistest more comprehensive in that
  they now clean out build products that would have resulted from local
  compilation (ie: builds performed within the 'blastest' or 'testsuite'
  directories).
- Added "cc" to list of expected compiler "vendors" since the CC variable
  seems to automatically be set to "cc" on Ubuntu 16.04 (which is just an
  alias to gcc).
- Comment update to build/config.mk.in.
2018-05-07 14:37:50 -05:00
Field G. Van Zee
35c5a1449c No longer update version file during configure.
Details:
- Recycled the core functionality of build/update-version-file.sh into a
  function in configure, disabling the updating of the 'version' file in
  the process. Instead of writing the patched version string back to the
  version file and then reading it again from within configure, the
  patched version string is now saved directly to a variable in the main()
  function in configure. This will prevent developers from accidentally
  committing configure-induced changes to the version file in between
  releases.
2018-05-07 12:04:57 -05:00
Mathieu Poumeyrol
8adb2f919b Some cross compilations fixes (#198)
* cross-compilation fixes
* add doc ranlib variable
* icc support -dumpversion, posix compatible test, plus one stupid mistake
* retab
* revert version as requested
2018-05-06 12:58:16 -05:00
Field G. Van Zee
89acd9ebe5 Merge branch 'amd' 2018-05-02 12:53:35 -05:00
Nisanth M P
4cff432d70 AMD specific optimizations for target 'zen' (#194)
Re-enabled AMD-specific optimizations for zen.

Details:
- Re-enabled Zen-specific cache blocksizes for 'zen' sub-configuration.
- Re-enabled small matrix gemm optimization for 'zen'.
- These were both temporarily disabled during a previous merge simply due to lack of Zen hardware for testing.
2018-05-02 12:50:42 -05:00
Field G. Van Zee
8eda5fe7f6 Typo fix in README.md. 2018-05-02 12:20:37 -05:00
Nisanth M P
0557eba78f Re-enabling the small matrix gemm optimization for target zen
Change-Id: I13872784586984634d728cd99a00f71c3f904395
2018-05-02 11:03:43 +05:30
Nisanth M P
df78ceb3d6 Re-enabling Zen optimized cache block sizes for config target zen
Change-Id: I8191421b876755b31590323c66156d4a814575f1
2018-05-02 11:03:20 +05:30
Field G. Van Zee
5e515f9a76 Tweaked new language in README.md. 2018-05-01 13:44:10 -05:00
Field G. Van Zee
1ddd9e316a Added link to Dave Love's Fedora Copr page.
Details:
- Added a blurb to README.md advertising Dave Love's Copr homepage,
  which contains rpm packages for RHEL/Fedora-like distributions.
2018-05-01 13:36:28 -05:00
Field G. Van Zee
078a852f73 Minor tweaks to top-level 'make clean' target.
Details:
- Execute 'cleanh' target as part of 'clean'
- Remove cblas.h file from 'include/<configname>/' as part of 'cleanh'
  target.
- Updated the echoed (non-verbose) text for uniformity.
2018-04-30 16:15:26 -05:00
Field G. Van Zee
01c4173238 CHANGELOG update (0.3.2) 2018-04-28 14:07:34 -05:00
Field G. Van Zee
2fb4408766 Version file update (0.3.2) 0.3.2 2018-04-28 14:07:31 -05:00
Field G. Van Zee
cdf041ddad Use config.mk instead of common.mk in bump-version.sh.
Details:
- Fixed inadvertent targeting of common.mk when testing whether configure
  had already been run, rather than config.mk.
2018-04-28 14:05:00 -05:00
Field G. Van Zee
6ded8f9f03 Account for recent 'make distclean' in bump-version.sh.
Details:
- Added logic to build/bump-version.sh that will run './configure auto'
  if 'common.mk' is not present (usually because 'make distclean' was run
  recently).
2018-04-28 14:01:29 -05:00
Field G. Van Zee
7c16fdce43 Fixed typo in RELEASING file. 2018-04-28 13:50:55 -05:00
Field G. Van Zee
5e5ca4984f README updates.
Details:
- Updates to the top-level README files in the top-level directory as
  well as the 'examples/oapi' directory.
2018-04-28 13:48:01 -05:00
Field G. Van Zee
627b045e30 Added an example of using transposition with gemm.
Details:
- Added an example to examples/oapi/8level3.c to show how to indicate
  transposition when performing a gemm operation.
2018-04-27 18:11:19 -05:00
Field G. Van Zee
13a0eadc69 Added more transposition/conjugation examples.
Details:
- Added code to examples/oapi/5level1m.c that demonstrates transposing
  (and conjugate-transposing) unstructured matrices.
- Comment updates to 6level1m_diag.c to maintain consistency with new
  examples in 5level1m.c.
2018-04-27 18:00:07 -05:00
Field G. Van Zee
5606cd8881 Added utility module to examples/oapi.
Details:
- Added a new code example file to examples/oapi demonstrating how to use
  various utility operations.
- Comment updates to other example files.
- README updates.
2018-04-27 17:13:10 -05:00
Field G. Van Zee
ff26c94c64 Added missing gcc version constraint for knl.
Details:
- Previously forgot to add explicit enforcement of a minimum gcc version
  in configure script when 'knl' sub-configuration is requested.
- Comment updates to configure.
2018-04-27 12:31:34 -05:00
Field G. Van Zee
4d97574e47 Added object API example code.
Details:
- Added an 'examples' directory at the top level.
- Added an 'oapi' subdirectory in 'examples' that contains a tutorial-like
  sequence of example code demostrating the core functionality of BLIS's
  object-based API, along with a Makefile and README. Thanks to Victor
  Eijkhout for being the first to suggest including such code in BLIS.
2018-04-24 18:48:09 -05:00
Field G. Van Zee
d6ab25a323 Add setijm, getijm operations.
Details:
- Added bli_setgetijm.c, which defines bli_setijm(), bli_getijm(), and
  related functions that can be used to read and write individual
  elements of an obj_t.
- Defined a new function, bli_obj_create_conf_to(), in bli_obj.c that will
  create a new object with dimensions conformal to an existing object.
  Transposition and conjugation states on the existing object are ignored,
  as are structure and uplo fields.
- Defined a new function, bli_datatype_string(), in bli_obj.c that returns
  a char* to a string representation of the name of each num_t datatype.
  For example, BLIS_DOUBLE is "double" and BLIS_DCOMPLEX is "dcomplex".
  BLIS_INT is included (as "int"), but BLIS_CONSTANT is not, and thus is
  not a valid input argument to bli_datatype_string().
- Added calls to bli_init_once() to various functions in bli_obj.c, the
  most important of which was bli_obj_create_without_buffer().
- Removed unintended/extra newline from the end of printv output.
- Whitespace changes to
  - frame/base/bli_machval.c
  - frame/base/bli_machval.h
  - frame/0/copysc/bli_copysc.c
- Trivial changes to README.md and common.mk.
2018-04-24 18:43:03 -05:00
Field G. Van Zee
a731a428f7 Another README.md update. 2018-04-17 16:44:55 -05:00
Field G. Van Zee
c734ee928a README.md update. 2018-04-17 16:40:05 -05:00
Field G. Van Zee
03ecad372d Added RELEASING file.
Details:
- Added a file named 'RELEASING' that contains basic notes on how to
  create a new version/release of BLIS. This is mostly just a reminder
  to myself, but also may become useful if/when others take over
  development and administration of the project.
2018-04-17 14:16:59 -05:00
Field G. Van Zee
24b3c3149c Merge branch 'dev' of github.com:flame/blis into dev 2018-04-16 18:49:38 -05:00
Field G. Van Zee
60366a3fab Updates to knl kernels and related code.
Details:
- Imported the 24x16 knl sgemm microkernel (and its corresonding spackm
  kernel) from TBLIS and enabled its use in the knl sub-config. Also
  Added sgemm microkernel prototype to bli_kernels_knl.h.
- Updated dgemm and dpackm microkernels from TBLIS, which included an
  important change regarding the offsets array (changed from extern
  declaration to static declaration/definition).
- Activated use of level-1v and -1f zen kernels in skx and knl
  sub-configs.
- Removed some old macros no longer needed in bli_family_skx.h now that
  libmemkind support exists in configure.
- Moved bli_avx512_macros.h to frame/include and adjusted #includes in
  skx and knl kernels accordingly.
- Moved unused kernels in kernels/knl/3 to kernels/knl/3/other
  directory.
- Fixed a minor bug in the 'make' output per compile when verboseness
  is not turned on. The rule-generating function 'make-kernel-rule' was
  previously passing in the name of the config, rather than the name of
  the kernel set returned by get-config-for-kset, which could give
  misleading information to the user when the kconfig_map mapped a
  kernel set to a sub-configuration that did not share the same name.
  (This didn't affect the CFLAGS that were actually used.)
- Updated test/3m4m/Makefile, removing acml targets and renaming the
  remaining targets.
2018-04-16 18:46:21 -05:00
Field G. Van Zee
817b67c017 Merge branch 'dev' of github.com:flame/blis into dev 2018-04-16 14:06:26 -05:00
Field G. Van Zee
67c9c2f86d Retired haswell gemm microkernels.
Details:
- Moved microkernels in kernels/haswell/3 to kernels/haswell/3/old. These
  microkernels were no longer being used and only sowed confusion to
  anyone inspecting the repository without being fully cognizant of the
  build system and how it works (and sometimes even to those who wrote
  the build system). Note that the haswell configuration currently
  employs the zen microkernels.
2018-04-16 14:03:12 -05:00
Field G. Van Zee
2b7108a8ef Minor updates to test driver makefiles.
Details:
- Cleaned up and homogenized the various test driver Makefiles in
  testsuite and test directories.
- Very minor updates to test driver code.
2018-04-16 12:35:53 -05:00
Field G. Van Zee
9f56df9557 Trivial tweaks to configure blacklisting output.
Details:
- Updated output of information vis-a-vis configuration blacklisting.
2018-04-11 14:51:36 -05:00
Field G. Van Zee
f56481efeb Cleaned up assembler version query on OS X.
Details:
- Swiched from querying version of 'objdump' to 'as' (e.g. the
  assembler).
- Fixed the outputting of the version of 'as' on OS X, which required
  this beauty:
    ...=$(as -v /dev/null -o /dev/null 2>&1)
- Only add sub-configs to blacklist if the sub-config hasn't already
  been added.
2018-04-10 19:02:21 -05:00
Field G. Van Zee
088c474e62 Added support for blacklisting via the assembler.
Details:
- Added logic to configure that attempts to assemble various small files
  containing select instructions designed to reveal whether binutils
  (specifically, the assembler) supports emitting those instruction sets.
  This information provides additional opportunities to blacklist sub-
  configurations that are unsupported by the environment. Thanks to Devin
  Matthews for pointing me towards a similar solution in TBLIS as an
  example.
- Various other cleanups in configure.
- Reorganized the detection code in the 'build' directory, bringing the
  "auto-detect" configuration detection, libmemkind detection, and new
  instruction set detection codes into a single new subdirectory named
  'detect'.
2018-04-10 18:09:56 -05:00
Field G. Van Zee
78a24e7dad Updated bli_avx512_macros.h in knl and skx configs.
Details:
- Downloaded updated version of bli_avx512_macros.h from TBLIS [1] in
  attempt to address issue #192.
  [1] https://github.com/devinamatthews/tblis/
2018-04-09 17:02:13 -05:00
Field G. Van Zee
388f64d6ad Fixed failure to honor CC= argument to configure.
Details:
- Fixed a failure to observe the value of CC when selecting the compiler
  in configure. Thanks to Devangi Parikh for reporting this bug.
- The semantics now also work for the CC environment variable. That is,
  if CC is set prior to running configure, that value is used, but will
  be overridden by specifying the CC= argument to configure. If the CC
  environment variable is not set, the CC= value is used. If neither the
  environment variable nor CC= are specified, then the choice is made
  internally to configure: first attempting to find gcc, then clang, and
  then cc.
2018-04-09 15:33:10 -05:00
Field G. Van Zee
45fbe66b3e Fixed libmemkind dependency for x86_64.
Details:
- Removed some old conditional code in config/knl/make_defs.mk that
  added -lmemkind to LDFLAGS if DEBUG_TYPE was not 'sde' and inserted
  code into common.mk that affirmatively filters out -lmemkind from
  LDFLAGS if DEBUG_TYPE is 'sde'. (Thanks to Dave Love for reporting
  this issue.) Other minor cleanups to neighboring code in common.mk.
- Updated CRVECFLAGS in knl/make_defs.mk to be based on -march=knl,
  and then AVX-512 functionality is manually removed via various
  -mno-avx512* flags. Also, make the setting of CRVECFLAGS conditional
  on CC_VENDOR. Similar change to skx/make_defs.mk.
- Comment/whitespace updates.
2018-04-09 14:01:08 -05:00
dnp
ca982148b3 Fixed bug in SKX sgemm microkernel. Modified SKX dgemm mircokernel to be consistent with the sgemm microkernel 2018-04-08 21:27:10 -05:00
Field G. Van Zee
bd0276752c Track separate ref kernel flags for each sub-config.
Details:
- Renamed CVECFLAGS variables in sub-configurations' make_defs.mk files
  to CKVECFLAGS.
- Added default defintions of two new make variables to most sub-
  configurations' make_defs.mk files--CROPTFLAGS and CRVECFLAGS--
  which correspond to reference kernel analogues of the CKOPTFLAGS
  and CKVECFLAGS, which track optimization and vectorization flags for
  optimized kernels. Currently, two sub-configurations (knl and skx)
  explicitly set CRVECFLAGS to non-default values (using AVX2 instead of
  AVX-512 for reference kernels. Thanks to Jeff Hammond, whose feedback
  prompted me to make this change (issue #187).
- Changed common.mk so that the get-refkern-cflags-for function returns
  the flags associated with the given sub-configuration's CROPTFLAGS
  and CRVECFLAGS (instead of CKOPTFLAGS and CKVECFLAGS).
2018-04-06 18:51:43 -05:00
Field G. Van Zee
b9aebce194 De-verbosify makefile fragment generation.
Details:
- Changed from -v1 to -v0 when calling gen-make-frag.sh from configure.
  The directory-by-directory recursive output didn't add much value to
  the user, so now we just echo a line for each top-level directory into
  which we will recurse (e.g. 'config', 'ref_kernels', 'frame', etc.).
  This also helps keep more interesting information (from earlier in the
  execution of configure) from scrolling out of the terminal window.
2018-04-06 18:37:33 -05:00
Field G. Van Zee
b549b91f26 Added 64-bit integer support to BLAS test drivers.
Details:
- Updated the build system and BLAS test drivers to use 64-bit integers
  when BLIS is configured for 64-bit integers in the BLAS layer. Also
  updated blastest/Makefile accordingly. Thanks to Dave Love for
  reporting the need for this feature.
- Added a 'check' target to blastest/Makefile so that the user can see
  a summary of the tests.
- Commented out the initial definition of INCLUDE_PATHS in common.mk,
  which was used pre-monolithic header, back when BLIS needed paths to
  *all* headers, rather than just a select few. This line is no longer
  needed since the value of INCLUDE_PATHS is overwritten by a later
  definition limited to only the header paths that are needed now.
2018-04-06 16:31:33 -05:00
Field G. Van Zee
d39fa1c042 Adjusted CFLAGS used to compile bli_cntx_ref.c.
Details:
- Removed CKOPTFLAGS and CVECFLAGS from the set of CFLAGS used to
  compile bli_cntx_ref.c for each configuration. This is necessary
  because the file defines functions like bli_cntx_init_skx_ref(),
  which are called during BLIS's initialization of the global kernel
  structure, potentially being executed by an architecture that lacks
  the instruction set used to compile the kernels for, in this example,
  skx, which would lead to an illegal instruction error. Thanks to
  Dave Love for reporting this issue.
- Further adjusted CFLAGS used when compiling code in the 'config'
  directory (e.g. bli_cntx_init_skx.c) as well as code in 'frame' so
  as to avoid the aforementioned issue.
2018-04-05 19:38:35 -05:00
Field G. Van Zee
08b123084d Added color-coding to 'make check' output.
Details:
- Added color coding to output of check-blistest.sh, check-blastest.sh
  scripts. Success messages are coded green and failure are coded red.
  This helps draw the eye toward those messages as the 'make checkblis',
  'make checkblis-fast', and 'make checkblas' targets are executed.
- Changed top-level Makefile so that execution will not halt if
  'checkblis', 'checkblis-fast', or 'checkblas' targets fail, which
  means that the second of the two tests (BLIS and BLAS) run by
  'make check' will run even if the first test fails.
2018-04-05 14:25:39 -05:00
Field G. Van Zee
c9e4d7db74 CHANGELOG update (0.3.1) 2018-04-04 17:13:15 -05:00