Commit Graph

1226 Commits

Author SHA1 Message Date
Field G. Van Zee
efa43e13ef More updates to CREDITS and RELEASING files. 2018-05-18 12:20:40 -05:00
Field G. Van Zee
f94ab97af8 Update to CREDITS file. 2018-05-17 17:45:31 -05:00
Field G. Van Zee
4919b10c00 Minor changes to README.md and CONTRIBUTING.md. 2018-05-17 16:38:49 -05:00
Field G. Van Zee
b89451187e README.md update.
Details:
- Added "Contributing" section with relevant links.
2018-05-17 16:23:06 -05:00
Field G. Van Zee
af244194e7 Removed explicit critical sec. from bli_memsys.c.
Details:
- Removed critical sections protecting the initialization/finalization of
  bli_memsys.c. These synchronization mechanisms are no longer needed now
  that BLIS initializes all APIs via pthread_once().
2018-05-17 15:38:02 -05:00
Field G. Van Zee
10c9e8f952 Cache hardware's arch_t id after querying once.
Details:
- Added logic to bli_arch.c that will call what was previously the body
  of bli_arch_query_id() only once and then cache the value in a static
  variable local to the file. (Previously, the arch_t associated with
  the hardware/configuration was queried every time bli_arch_query_id()
  was called, which was at least once per level-3 function call. Thanks
  to Devin Matthews for suggesting this feature via issue #175.
- Added -lpthread to the compile/link command line of the compiler
  invocation that compiles build/detect/config/config_detect.c, which
  prints the string identifying the detected configuration, since it
  is now needed due to new pthread_once() logic in bli_arch.c.
- Implementation note: I chose to implement this arch_t caching feature
  via pthread_once(), using a separate pthread_once_t variable local to
  the file, rather than calling bli_init_once(). The reason is that I
  did not want to require bli_init() as a prerequisite to this function.
  bli_init() already calls several sub-components, some of which make use
  of bli_arch_query_id(), and therefore it would be easy to fall into a
  circular self-init situation (which usually causes pthreads to hang
  indefinitely).
2018-05-17 15:22:51 -05:00
Francisco Igual
f28a152938 Fixed clobber list bug in ARMv8 ukernel 2018-05-17 09:26:14 +00:00
Field G. Van Zee
2e31dd7852 Inserted missing integer typecasting into ukernels.
Details:
- Inserted missing safeguards into most microkernels to ensure that the
  integers read by the microkernel's assembly instructions are of the
  appropriate size. In many cases, this bug was going undetected likely
  because the compiler was inserting zero padding before the integers
  in the calling function, allowing the assembly code to read 64-bits
  in a way that did not corrupt the "lower" 32 integer bits with garbage
  in the higher bits. Thanks to Francisco Igual and Devangi Parikh for
  finding this issue.
2018-05-16 17:28:33 -05:00
Field G. Van Zee
12dfa95164 Fixed a bug in determining default integer size.
Details:
- Fixed a bug that would cause configurations to inadvertantly define
  their integers to be 32 bits when those environments actually call for
  64-bit integers. While either BLIS_ARCH_64 or BLIS_ARCH_32 is defined
  in bli_system.h (based on whether preprocessor macros such as __x86_64
  or __aarch64__ are defined by the environment), bli_system.h was being
  #included *after* bli_config_macro_defs.h, in which the BLIS_ARCH_64
  macro was used to choose an integer type size in the event that
  BLIS_INT_TYPE_SIZE was not already defined by configure via
  bli_config.h. And due to the structure of the cpp code in that file,
  the 32-bit integer case was being chosen. Thanks to Francisco Igual
  and Devangi Parikh for their help in isolating this bug.
- Moved the #include of hbwmalloc.h and related preprocessor code to
  bli_kernel_macro_defs.h to facilitate the reshuffling of the #include
  for bli_system.h in blis.h.
2018-05-16 12:46:57 -05:00
Field G. Van Zee
f930cec0f3 More tweaks to CONTRIBUTING.md. 2018-05-15 17:47:08 -05:00
Field G. Van Zee
173e30ff7d Added initial draft of CONTRIBUTING.md file.
Details:
- Thanks to the Ruby on Rails project for providing a good template off
  of which to build.
2018-05-15 14:48:34 -05:00
Nico Schlömer
6e25e758b4 Debian config (#206)
* add debian config

* correct wording in the README
2018-05-15 07:03:20 -05:00
Alex Arslan
fcf6c6a3c8 Fix shared library builds on platforms other than Linux and macOS (#209)
* Fix detection of systems other than Linux and macOS

The way the logic is currently laid out, any platform that isn't Linux
gets assigned the .dylib shared library extension and the macOS-specific
compiler flags. This reverses the logic to check for macOS first, and
have the fallback use the Linux definitions, which apply to most other
systems as well.

* Use SHLIB_EXT instead of SO_SUF

The former is more standard, as jakirkham pointed out in a comment.
2018-05-14 20:41:03 -05:00
Field G. Van Zee
6f7f51048c Echo cc_vendor when printing compiler version.
Details:
- Echo the ${cc_vendor} when informing the user of the compiler's version.
  Previously, the actual ${cc} (which could be a path to the executable)
  was being printed, which has already been printed by that point in the
  configure script.
2018-05-14 18:41:56 -05:00
Field G. Van Zee
ad67dc4e34 Communicate cc, cc_vendor to make via config.mk.
Details:
- Historically, the compiler selection has happened statically in the
  various make_defs.mk and would only be overriden by setting CC (either
  prior to running configure or as a configure argument). However, in
  the last couple months, configure has evolved to contain rather
  sophisticated compiler detection logic for the purposes of blacklisting
  sub-configurations. It only makes sense that configure now fully take
  over the responsibility of selecting a compiler from the GNU make side
  of the build system. Thanks to Alex Arslan for his help exposing this
  issue.
- Substitute found_cc into CC in config.mk via configure.
- Set a new variable, CC_VENDOR, in config.mk via substitution from
  configure, and disable the corresponding CC_VENDOR code in common.mk.
- Disabled default compiler selection (usually gcc) in the sub-configs'
  various make_def.mk files.
2018-05-14 18:35:28 -05:00
Field G. Van Zee
20af119fc9 Added README.md to 'config' directory.
Details:
- Added a brief README.md file to the config directory to redirect those
  who may be exploring the source tree to the ConfigurationHowTo wiki.
  (Included is a very brief explanation of configurations for those who
  don't have time to read the wiki.) Thanks to Nico Schlömer for this
  suggestion.
2018-05-14 17:44:58 -05:00
Field G. Van Zee
9dbce16269 Search for 'cc clang gcc' on OpenBSD, FreeBSD.
Details:
- Swapped gcc and clang in the compiler search list for OpenBSD.
- Use the same search list for FreeBSD as above.
2018-05-14 17:04:54 -05:00
Field G. Van Zee
55ebf24d63 Change compiler search order on OpenBSD.
Details:
- Set a compiler search list (and order) as a function of the OS detected
  via 'uname -s'. By default, this list and order is 'gcc clang cc' for
  Linux and Darwin (OS X), and any other OS except OpenBSD). On OpenBSD,
  we use 'cc gcc clang' because OpenBSD's default installation of gcc
  (4.2.1) is too old for BLIS. Thanks to Alex Arslan for reporting this
  issue and suggesting a fix.
2018-05-14 16:19:08 -05:00
Field G. Van Zee
4fb353bd90 Merge branch 'master' into dev 2018-05-13 17:50:51 -05:00
Field G. Van Zee
8a2857b5e3 Fixed README.md typo; mention 'make check'. 2018-05-11 18:42:05 -05:00
Field G. Van Zee
543935c02f Updated README.md with Ubuntu packages link.
Details:
- Created a separate section of README.md for external packages, with
  one bullet each for Dave Love's rpms and Nico Schlömer's Ubuntu apt
  packages. Thanks to Dave and Nico for their contributions.
2018-05-11 18:35:32 -05:00
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
4b36e85be9 Converted function-like macros to static functions.
Details:
- Converted most C preprocessor macros in bli_param_macro_defs.h and
  bli_obj_macro_defs.h to static functions.
- Reshuffled some functions/macros to bli_misc_macro_defs.h and also
  between bli_param_macro_defs.h and bli_obj_macro_defs.h.
- Changed obj_t-initializing macros in bli_type_defs.h to static
  functions.
- Removed some old references to BLIS_TWO and BLIS_MINUS_TWO from
  bli_constants.h.
- Whitespace changes in select files (four spaces to single tab).
2018-05-08 14:26:30 -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
75d0d1057d Renamed various datatype-related macros/functions.
Details:
- Renamed the following macros in bli_obj_macro_defs.h and
  bli_param_macro_defs.h:
  - bli_obj_datatype()                 -> bli_obj_dt()
  - bli_obj_target_datatype()          -> bli_obj_target_dt()
  - bli_obj_execution_datatype()       -> bli_obj_exec_dt()
  - bli_obj_set_datatype()             -> bli_obj_set_dt()
  - bli_obj_set_target_datatype()      -> bli_obj_set_target_dt()
  - bli_obj_set_execution_datatype()   -> bli_obj_set_exec_dt()
  - bli_obj_datatype_proj_to_real()    -> bli_obj_dt_proj_to_real()
  - bli_obj_datatype_proj_to_complex() -> bli_obj_dt_proj_to_complex()
  - bli_datatype_proj_to_real()        -> bli_dt_proj_to_real()
  - bli_datatype_proj_to_complex()     -> bli_dt_proj_to_complex()
- Renamed the following functions in bli_obj.c:
  - bli_datatype_size()                -> bli_dt_size()
  - bli_datatype_string()              -> bli_dt_string()
  - bli_datatype_union()               -> bli_dt_union()
- Removed a pair of old level-1f penryn intrinsics kernels that were no
  longer in use.
2018-04-30 14:57:33 -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